I've an issue with a json array row length...
I want to extract the correct length of data-row json (in this case "2")... If I try to count the length I get the value "1". Why ? How can I get the correct length ?
{
"data-row": {
"data1": [{
"firstName": "John",
"lastName": "Doe"
}, {
"firstName": "Anna",
"lastName": "Smith"
}, {
"firstName": "Peter",
"lastName": "Jones"
}],
"data2": [{
"firstName": "John",
"lastName": "Doe"
}, {
"firstName": "Anna",
"lastName": "Smith"
}]
}
}
Object.keys(jsondata.data-row).length