0

Is there a way to read all the nodes & child nodes in a json

for example :

var json_1 = {
    "_id": new ObjectID("58bfb7f924bd630dbc7edd31"),
    "FirstArray": [],
    "Data": [
        {
            "id": "589cad2ff5fd3d7891f01108",
            "modelName": "bbbb",
            "modelVersion": "1",
            "sequence": "11111",
            "aaaaaa": "12345",
            "values": [
                {
                    "Zeroth": "67890",
                    "First": "A",
                    "Second": "A",
                    "Third": "AAC",
                    "Forth": 2,
                    "Fifth": 239.804,
                    "Sixth": "A",
                    "Seventh": "A",
                    "Eighth": "2017-02-03T21:53:45.000Z",
                    "Ninth": "Test",
                    "Tenth": "Test"
                }
            ],
            "Date": "2017-02-03T21:53Z"
        }
    ]
}

I'd like to fetch all the keys in the above json and store it in a array.

georg
  • 211,518
  • 52
  • 313
  • 390

0 Answers0