javascript - How to access json object using node.js express.js -


my json this

var jsonobj = json.stringify(arr, null, 4); console.log(jsonobj); 

my output this

json output

i want access each , every element in json. plese provide me solution task

from can tell looks have array of objects , within object sub array ("subacts"). able iterate on objects in "subacts" array need iterate on way:

jsonobject.foreach(function(object) {    object.subacts.foreach(function(subobject) {      console.log(subobject);   }); }); 

this iterate through entire object , print console subacts array objects.


Comments

Popular posts from this blog

c++ - list<myClass<int> * > sort -

c - Defining floating point constants, how many digits are useful? -

C# Apple Bonjour - how to monitor service records within Windows -