Suppose I have the following JSON object:
{"root":{"Child":0, "Child1":0, "Child2":[0, 0, 0, 0]}}
This JSON object may be complex.
I'm interested in printing each input path from my complex JSON object in JQUERY. My output should look like:
{"root":{"Child":0}}
{"root":{"Child1":0}}
{"root":{"Child2[0]":0}}
{"root":{"Child2[1]":0}}
{"root":{"Child2[2]":0}}
{"root":{"Child2[3]":0}}
How would you print a complex JSON object in this way without specifying the name of JSON variables in Jquery?