title: JSONPath Export Key & Value
body: <p>I am using JSONPath to filter out a json file, I am trying to retrieve both the Key + Value from the JSON array but I am lost at figuring how best to do this.</p>
  <p><strong>QUERY</strong></p>
  <pre><code>$.phoneNumbers[*].[type,number]
  </code></pre>
  <p><strong>ARRAY</strong></p>
  <pre><code>{
    &quot;firstName&quot;: &quot;John&quot;,
    &quot;lastName&quot; : &quot;doe&quot;,
    &quot;age&quot;      : 26,
    &quot;address&quot;  : {
    &quot;streetAddress&quot;: &quot;naist street&quot;,
    &quot;city&quot;         : &quot;Nara&quot;,
    &quot;postalCode&quot;   : &quot;630-0192&quot;
   },
   &quot;phoneNumbers&quot;: [
    {
       &quot;type&quot;  : &quot;iPhone&quot;,
       &quot;number&quot;: &quot;0123-4567-8888&quot;,
       &quot;address&quot;  : {
          &quot;streetAddress&quot;: &quot;naist street&quot;,
          &quot;city&quot;         : &quot;Nara&quot;,
          &quot;postalCode&quot;   : &quot;630-0192&quot;
    }
  },
  {
    &quot;type&quot;  : &quot;home&quot;,
    &quot;number&quot;: &quot;0123-4567-8910&quot;,
    &quot;address&quot;  : {
          &quot;streetAddress&quot;: &quot;naist street&quot;,
          &quot;city&quot;         : &quot;Nara&quot;,
          &quot;postalCode&quot;   : &quot;630-0192&quot;
     }
    }
   ]
  }
  </code></pre>
  <p><strong>CURRENT OUTPUT</strong></p>
  <pre><code>[
    &quot;iPhone&quot;,
    &quot;0123-4567-8888&quot;,
    &quot;home&quot;,
    &quot;0123-4567-8910&quot;
  ]
  </code></pre>
  <p><strong>Desired Outcome</strong></p>
  <pre><code>[
   {
     &quot;type&quot;  : &quot;iPhone&quot;,
     &quot;number&quot;: &quot;0123-4567-8888&quot;,
   },
   {
     &quot;type&quot;  : &quot;home&quot;,
     &quot;number&quot;: &quot;0123-4567-8910&quot;,
   }
  ]
  </code></pre>