title: JSONPath get the id of a parent element by a sub-child value
body: <p>Given the following JSON I want to get the <code>id</code> field of the parent by an equals text compare of a sub-child element:</p>
  
  <pre><code>{
      "datapoints": [{
              "id": "default.1",
              "definedBy": "default/0.1",
              "featureValues": {
                  "bui.displayname": "Health status",
                  "bui.visibility": "normal",
                  "default.access": "r",
                  "default.basetype": "text",
                  "default.description": "Aggregated health status",
                  "default.format": "text/plain",
                  "default.name": "health_status",
                  "default.restriction": "re:(OK|WARN|ERROR|UNKNOWN)"
              }
          }, {
              "id": "kdl.240",
              "definedBy": "kdl/0.9",
              "featureValues": {
                  "bui.displayname": "Delta K",
                  "bui.visibility": "normal",
                  "default.access": "rw",
                  "default.basetype": "real",
                  "default.description": "Delta K",
                  "default.name": "Delta_K",
                  "default.privacy": "false",
                  "default.restriction": "b32"
              }
          }
      ]
  }
  </code></pre>
  
  <p>My first goal is to get the correct data point by a sub-child text compare like:</p>
  
  <p><code>$['datapoints'][*]['featureValues'][?(@['default.name']=='Delta_K')]</code></p>
  
  <p>It seems not to work when I test it on <a href="http://jsonpath.com/" rel="noreferrer">http://jsonpath.com/</a>
  To get all the data points I used this successfully:</p>
  
  <p><code>$['datapoints'][*]['featureValues']['default.name']</code></p>
  
  <p>My goal is to get the <code>id</code> value of the data point with the <code>featureValues</code> child element <code>default.name</code> is equal <code>Delta_K</code>. In the example this would be <code>kdl.240</code>.</p>