I want to create MD array from numbers like below to send as JSON
OrderStatus Counts
Shipped 3
Pending 5
Final output should be,
[{order_status: "Shipped", Counts: 3}, {order_status: "Pending", Counts: 5} ]
Currently i am able to send only 1 row with this,
$orderTable[] = array(
'order_status' => 'Shipped',
'Counts' => 3);
How can i send two values as Json array?