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

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -