I'm struggling to access the nested JSON object values through iteration.
Even after attempting
console.log(test[0].Invoice[0].Cost.NO[0]);
, I still can't get it to work.
var test = [{
"Invoice": {
"NO": "869",
"$$hashKey": "object:186"
},
"Cost": [{
"NO": 183,
"Amnt": 100
}, {
"NO": 184,
"Amnt": 200
}]
}, {
"Invoice": {
"NO": "698",
"$$hashKey": "object:189"
},
"Cost": [{
"NO": 110,
"Amnt": 150
}, {
"NO": 142,
"Amnt": 263
}]
}];
console.log(test[0].Invoice[0].Cost.NO[0]);