标签:
例如数据库里面的json字符串是这样的
var str = ‘[{"name":"宗2瓜","num":"1","price":"122"},{"name":"宗呱呱","num":"1","price":"100"}]‘; var xqo = eval(‘(‘ + str + ‘)‘); for(var i in xqo){ alert(xqo[i].name); }
标签:
原文地址:http://www.cnblogs.com/zonglonglong/p/4275168.html