title: How would you get a JSONPath to all child nodes in an array of JSON object?
body: <p>How would you get a JSONPath to all child node of an object?</p>
  
  <p>E.g.:</p>
  
  <pre><code>var data = [{
      "key1": {
          "children": [{
              "key2": "value",
              "key3": "value",
              "key4": {}
          }, {
              "key2": "value",
              "key3": "value",
              "key4": {}
          }],
          "key5": "value"
      }
  }, {
      "key1": {
          "children": {
              "key2": "value",
              "key3": "value",
              "key4": {}
          },
          "key5": "value"
      }
  }]
  </code></pre>
  
  <p>I want to get absolute path for all nodes in the data structure as an array:</p>
  
  <pre><code>[
      "data[0]['key1']['children'][0]['key2']", 
      "data[0]['key1']['children'][0]['key3']", 
      "data[0]['key1']['children'][0]['key4']", 
      ......, 
      "data[0]['key1']['children'][1]['key2']",
      ......., 
      "data[1]['key1']['children']['key2']",
      ..........
  ]
  </code></pre>
  
  <p>Is there any way to get this done in JS?</p>