I wish to parse a JSON file which is generated dynamically and does not have a definite structure.
[
  {
    "children": [
      {
        "children": [
          {
            "children": [],
            "text": "Child node 2.txt",
            "isFolder": false,
            "id": "1childnode2.txt",
            "itsPath": "C:\\Users\\pandyapa\\Root node\\Child node 2.txt",
            "type": "itsfile"
          }
        ],
        "text": "Child node 1.txt",
        "isFolder": false,
        "id": "0childnode1.txt",
        "itsPath": "C:\\Users\\pandyapa\\Root node\\Child node 1.txt",
        "type": "itsfile"
      },
      {
        "children": [],
        "text": "Child node 2.txt",
        "isFolder": false,
        "id": "1childnode2.txt",
        "itsPath": "C:\\Users\\pandyapa\\Root node\\Child node 2.txt",
        "type": "itsfile"
      },
      {
        "children": [],
        "text": "Child node 3.txt",
        "isFolder": false,
        "id": "2childnode3.txt",
        "itsPath": "C:\\Users\\pandyapa\\Root node\\Child node 3.txt",
        "type": "itsfile"
      }
    ],
    "text": "Root node",
    "isFolder": true,
    "id": "3rootnode",
    "itsPath": "C:\\Users\\pandyapa\\Root node",
    "type": "default"
  }
]
This JSON can have any nested children. I wish to parse each JSON object, compare its "id" key and retrieve the "itspath" value. I tried but was unsuccessful. Any help is highly appreciated.
 
    