This is the json that is generated using PHP
[{Sale:{id:1,customer_id:1,amount:15,created:2014-05-17}}]
Doing orderBy:id
is obviously not working. I read in other posts that an orderBy function needs to be created for this kind of data structure. I am not able to create the function. Can anyone please tell me what is the correct way to approach this?