I have an object including only one Array(17). I would like to get from this array specific value, ex for index = 4 -> 1523181939
.
How can I get it?
I am getting a console result by running:
this.temp = this.flights['states'];
console.log(this.temp);
console.log(typeof this.temp);
My object this.flights
is of the form
{time: 1523183848, states: Array(1)}
states: [Array(17)]
time: 1523183848
__proto__: Object
When I call this.flights['states']
I get:
[Array(17)]
Lastly when calling this.flights['states'][0][4]
I get an error:
ERROR TypeError: Cannot read property '0' of undefined
Starting flights object I am getting from Opensky-Network Api:
{
"time": 1523183840,
"states": [
[
"89906e",
"EVA857 ",
"Taiwan",
1523183838,
1523183839,
121.2966,
25.1178,
716.28,
false,
111.38,
50.06,
8.78,
null,
746.76,
null,
false,
0
]
]
}