title: How to convert my array to object containing an object?
body: <p>I have an array or may be payload which is object an array,</p>
  <pre><code>{
      &quot;key&quot;: &quot;value&quot;,
      &quot;key2&quot;: &quot;value2&quot;
      &quot;myids&quot;: [
          {
              &quot;key&quot;: &quot;value&quot;,
              &quot;num&quot;: 123,
              &quot;label&quot;: &quot;equal&quot;
          }
      ]
  }
  </code></pre>
  <p>but need to change this payload to just below object of object</p>
  <pre><code>{
      &quot;key&quot;: &quot;value&quot;,
      &quot;key2&quot;: &quot;value2&quot;
       &quot;myids&quot;: {
          &quot;myid&quot;: {
              &quot;key&quot;: &quot;value&quot;,
              &quot;num&quot;: 123,
              &quot;value&quot;: &quot;equal&quot;
          }
      }
  }
  </code></pre>
  <p>this myid object is fix i have to make this and put array into this
  any kind of help of would be grateful...</p>