json to infotable
I get JSON type data.
output is
{
"array": [
{
"times": [
{
"color": "#f2b827",
"ending_time": 1593478173523,
"extra": "Indischarging",
"starting_time": 1593475515628,
"percent": 2657895
},
{
"color": "#3ec557",
"ending_time": 1593475515628,
"extra": "Charging",
"starting_time": 1593442800000,
"percent": 32715628
}
]
}
]
}
So I'm going to make infotable with this data.
for(var i=0; i < json.times.length; i++) {
infotabletest.AddRow({extra:json.times[i].extra,
color:json.times[i].color,
starting_time:json.times[i].starting_time,
ending_time:json.times[i].ending_time,
percent:json.times[i].percent});
}
var result = infotabletest;
but I can't do that. output is "Error executing service test. Message :: TypeError: Cannot read property "length" from undefined.
Can you help me out? Thank you.

