Consider the following sample JSON array:
[{
info: {
refOne: 'refOne',
refTwo: [{
refOne: 'refOne',
refTwo: 'refTwo'
}]
}
}, {
info: {
refOne: 'refOne',
refTwo: [{
refOne: 'refOne',
refTwo: 'refTwo'
}]
}
}]
The above JSON is a simple representation of a database query response, What is the correct way within Nodejs to loop through each 'refTwo' array within the parent info array?
sudo example: for each item in sample JSON for each refTwo item in current item do something
I have a suspicion that the 'async' lib may be required here but some advice is much appreciated.