title: How to convert json array to json object in javascript
body: <p>I have a json array like in the below image:</p>
  
  <p><a href="https://i.stack.imgur.com/b8fun.png" rel="nofollow">JSon array</a></p>
  
  <p>I want it to be onyl json object and not array. Like when I do JSON.stringify I get this: <code>[{"total_exec_qty":"286595","total_notional":"21820771.72","total_wt_arr_last_slp":"2.4364","total_num_ords":"1630","total_wt_ivwap_slp":"6.0969","total_wt_arr_slp":"1.7889","total_ord_qty":"576991"}]</code></p>
  
  <p>But I only want it like this: <code>{"total_exec_qty":"286595","total_notional":"21820771.72","total_wt_arr_last_slp":"2.4364","total_num_ords":"1630","total_wt_ivwap_slp":"6.0969","total_wt_arr_slp":"1.7889","total_ord_qty":"576991"}</code></p>
  
  <p>How do I get that?</p>
  
  <p>UPDATE: Doing this right now already:</p>
  
  <pre><code>var json_temp = JSON.stringify(json4);
      console.log("json_temp")
      console.log(json_temp);
      var json_temp1 = json_temp[0];
      console.log("json temp1");
      console.log(json_temp1);
  </code></pre>
  
  <p>But getting the following in console.log:
  <a href="https://i.stack.imgur.com/R4V8G.png" rel="nofollow">Getting this problem</a></p>