the php json_encode($object) result is
[{"price_id":"1","website_id":"0","price_qty":2,"price":"90.0000"},
{"price_id":"2","website_id":"0","price_qty":5,"price":"80.0000"},
{"price_id":"3","website_id":"0","price_qty":8,"price":"70.0000"}]
someone tell me, var sorted = arrayWithJsonData.sort(function(a,b){}
how to use the above php json_encode($object) to arrayWithJsonData. i used the following way, but it shows TypeError: object.sort is not a function
first: in php i did: echo '<div style="display:none;" id="object">'.$object.'</div>'; then using in jquery
var object=jQuery("#object").text(); // first sort the array var sorted = object.sort(function(a,b){}