Can anyone explain how to " Convert Array integer to integer"?

Hi All,
let number =[[1648]] . I want to convert this to integer. Till now I have tried
number[0][0]. it is showing as string now.

I have tried to use type as “undefined | (undefined | int ) []” where expected just int
Can you please guide me on this.

Thanks in Advance!!

What exactly do you want to do with that int? Can you post a code example?

In general terms, from the type system’s perspective, there’s a possibility that number[0][0] is None (or, in JS/TS terms, undefined). So you have to handle this case somehow. See Null, Undefined and Option, for starters.

If you don’t open rescript/core or belt before, it should return an int.

let x = [[1648]] // array<array<int>>
let y = x[0][0] // int

I’d also be interested in an example.
What does the data represent? Do you want to aggregate / count the numbers in the inner array? why do you want to do [0][0] accessors?