title: How to convert an object to an array of specific format
body: <pre><code>{
      &quot;vendorName&quot;: &quot;RAKESH KUMAR&quot;,
      &quot;vendorContact&quot;: &quot;8876545678&quot;,
      &quot;vendorPAN&quot;: &quot;ATMPB6657F&quot;,
      &quot;vendorBankDetails&quot;: [
          {
              &quot;vendorAccount&quot;: &quot;3456787654&quot;,
              &quot;vendorBankCode&quot;: &quot;AXIS123&quot;,
              &quot;vendorBankName&quot;: &quot;AXIS BANK&quot;
          }
      ],
      &quot;createdAt&quot;: &quot;2021-09-01 00:18:10&quot;
  }
  </code></pre>
  <p>to</p>
  <pre><code>[0:{
      &quot;vendorName&quot;: &quot;RAKESH KUMAR&quot;,
      &quot;vendorContact&quot;: &quot;8876545678&quot;,
      &quot;vendorPAN&quot;: &quot;ATMPB6657F&quot;,
      &quot;vendorBankDetails&quot;: [
          {
              &quot;vendorAccount&quot;: &quot;3456787654&quot;,
              &quot;vendorBankCode&quot;: &quot;AXIS123&quot;,
              &quot;vendorBankName&quot;: &quot;AXIS BANK&quot;
          }
      ],
      &quot;createdAt&quot;: &quot;2021-09-01 00:18:10&quot;
  }]
  </code></pre>