title: Get parent object using jsonpath query
body: <p>i have the json below:</p>
  
  <pre><code>{
  "data": [
      {
          "name": "product1",
          "details": ["lorem ipsum", [
              {
                  "code": "prd1"       
              },
              {
                  "code": "prd11"
              }]
          ]
      },
      {
          "name": "product2",
          "details": ["lorem ipsum", [
              {
                  "code": "prd2"
              },
              {
                  "code": "prd22"
              }]
          ]
      }
  ]
  </code></pre>
  
  <p>}</p>
  
  <p>and i want to retrieve the name of the product based on the code, so 
  i wrote this query</p>
  
  <pre><code>$.data..[?(@.code=="prd1")]
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>[
  {
      "code": "prd1"
  }]
  </code></pre>
  
  <p>Expected result:</p>
  
  <pre><code>[{name: "product1"}]
  </code></pre>