作者pttnews (PTT新聞)
看板Ajax
標題[問題] PlainObject 轉換
時間Tue Feb 19 15:42:06 2013
有一字串
aa = '{src : "./story/20090612_91.png" , alt : "" , title : "2009/06/12" }';
想要轉為 Jquery的PlainObject,請問如何?
alert($.isPlainObject(aa)); ->false
var o = {};
alert($.isPlainObject(o)); ->true
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 59.120.175.188
1F:推 mrbigmouth:$.isPlainObject($.parseJSON(aa)) 02/19 15:45
非常感謝~
感恩
※ 編輯: pttnews 來自: 59.120.175.188 (02/19 15:49)