How to return response of array of objects
<p>Here is my Response</p>

<pre><code>data : [{id: 30, tmb_order_id: "TMB030"}, {id: 33, tmb_order_id: "TMB033"}]
</code></pre>

<p>Like this pic</p>

<p><a href="https://i.stack.imgur.com/jyf41.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jyf41.png" alt="enter image description here"></a></p>

<p>But i want my Response like </p>

<pre><code>{
    "data": [
        [
            "30",
            "TMB030"
        ],
        [
            "33",
            "TMB033",
        ],
    ]
}
</code></pre>

<p>How can i do this ?</p>

<p>Here is the way how i get it in controller</p>

<pre><code>$data = Order::where('user_id',$id)-&gt;where('status',1)-&gt;select('id', 'tmb_order_id')-&gt;get();
        $Response = array('data' =&gt; $data ); 
        return $Response;
</code></pre>

<p>What should i do to get the response like that ?</p>

<p>Help pls</p>