i want to know how to get nice json from a query resut
let assume that we have tow tables : CUSTOMERS and ORDERS
when i query about customer's orders i want to get result like this:
{
"customer_name":"john dohe" ,
"orders": [
{
"order_id":1 ,
"order_date" :"12-12-2007"
} ,
{
"order_id":2 ,
"order_date" :"13-12-2007"
} ,
{
"order_id":13,
"order_date" :"14-12-2007"
} ,
hello
i want to know how to get nice json from a query resut let assume that we have tow tables : CUSTOMERS and ORDERS when i query about customer's orders i want to get result like this: { "customer_name":"john dohe" , "orders": [ { "order_id":1 , "order_date" :"12-12-2007" } , { "order_id":2 , "order_date" :"13-12-2007" } , { "order_id":13, "order_date" :"14-12-2007" } ,
]
}
how to achieve that?