從服務器數據成爲一個JSON數組作爲responseText的Ajax請求:如何使用Prototype(JS)評估這個特定的JSON?
Price : [{"id":"1","max_price":"100000"},{"id":"2","max_price":"150000"},{"id":"3","max_price":"200000.55"}]
Name : [{"id":"1","name":"P1"},{"id":"2","name":"P2"},{"id":"3","name":"P3"}]
我看到成原型這種方法:var json = transport.responseText.evalJSON(true);
我如何才能得到的價格排列,所以JSON等於:
[{"id":"1","max_price":"100000"},{"id":"2","max_price":"150000"},{"id":"3","max_price":"200000.55"}]`
數據實際上是無效的JSON。這*完全是*服務器向您發送的內容? – Evert 2011-04-08 12:34:07
我認爲它應該是''價格「:...'和''名稱」:...' – kjy112 2011-04-08 12:35:42