I am querying my database Select * from Customer
the customer tables holds Name,Surname Address,age.
I want to be able to transform the query into a json object in the following object:
Customer:
[
{Name:"john", Surname:"Beta" ,Age:"23"},
{Name:"Fred", Surname:"alpha" ,Age:"31"}
];
Do you have any ideas?I tried to loop through the query and use merge_array.. but it MERGED the array as expected... Thank you for your time.