I have got this JSON
var data =
[
{
"new": [
{
"screen": "SCR2",
"time_of_order": "20:08:58",
"status": "Viewed",
"item_id": "9,6,5,4",
"quantity": "1",
"vendor_id": "1",
"order_id": "140827080458858O1O1",
"json_value": [
{
"SurCharges": "50"
},
{
"SurCharges": "50"
},
{
"SurCharges": "50"
}
],
"seat_number": "D12"
}
]
}
];
How to get the length of a nested array named json_value ??
This is my jsfiddle
http://jsfiddle.net/03zw041h/2/
Tried using
alert(data.new.json_value.length);
But console is reporting an error
Uncaught TypeError: Cannot read property 'json_value' of undefined