jQuery string to json

在jQuery中,想要把json string 轉成json object 其實非常的簡單
只要使用 jQuery.parseJSON 附上範例var response=jQuery.parseJSON('"ret":"test"');
只要字串是正確的json格式
這時response 就是json object

沒有留言:

張貼留言