I have some data that is in JSON object array. I'm trying to use nested forEach loops to extract the data.
The data is modeled like belo. There's multiple dataModels and multiple childNodes inside the dataModels.
//this is what an example data looks like
dataModels[0].childNodes[0].appId
I am trying to do something like the following:
dataModels.forEach(function(entry){
entry.forEach(function(childrenEntry){
console.log(childrenEntry.appId);
})
})
The above however does not work and it gives me an error saying that 'entry' is not a function. Is there a better way to achieve what I'm trying to do?
entry.childNodes.forEachmaybe? And you have a typo infunction(childrenEntry{