PHP json_encode($object) の結果は
[{"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"}]
誰か教えてvar sorted = arrayWithJsonData.sort(function(a,b){}
上記のphp json_encode($object)をarrayWithJsonDataに使用する方法。私は次の方法を使用しましたが、それは TypeError を示しています: object.sort は関数ではありません
最初:phpで私がした:echo '<div style="display:none;" id="object">'.$object.'</div>';
次にjqueryで使用する
var object=jQuery("#object").text(); // first sort the array var sorted = object.sort(function(a,b){}