title: how to pass dynamic key to json object
body: <p>I need result like the following json object:</p>
  <pre class="lang-js prettyprint-override"><code>testObj = [{
    test1: &quot;cat&quot;,
    category: &quot;Animal&quot;
  }, {
    test2: &quot;parrot&quot;,
    category: &quot;Bird&quot;
  }, {
    test3: &quot;Dog&quot;,
    category: &quot;Animal&quot;
  }]
  </code></pre>