小程序json字符串轉(zhuǎn)json對象
var that = this
var jsonStr = options.json;
if (typeof jsonStr != 'object') {
jsonStr = jsonStr.replace(/\ufeff/g, "");//重點(diǎn)
var jobj = JSON.parse(jsonStr);// 轉(zhuǎn)對象
options.json = jobj;
}
that.setData({
jdata : options.json
})