"Can someone help me why the function $ .each (); iterates through helper objects in the main object?"
To loop auxiliary objects, you will need subperiods.
When using the each()
[docs] method, as you usually usually work (as it is now) , this is really intended for DOM elements.
Use jQuery.each()
[docs] method jQuery.each()
:
$.each( objectVar, function(index,record){ console.log(record);
Now your cycle will be expanded to the first level of nested objects.
If you are not sure about the overall structure and want to list the entire depth, you will need to check each value found to see if it should be listed.
source share