我有像這樣的填充JSON/JS數據:檢索JSON對象?
var settingDefs = [];
settingDefs.push({
name:'responses', label:'Responses', type:'aeditor',
defaultValue: Object.toJSON([
{"id":"1", "name":"Bob", "text":"Is here"},
{"id":"2", "name":"James", "text":"Online"},
])
});
我將如何檢索條目說,如果我有「1」,我想用「1」來檢索名稱/文本查找該條目(條目1)?
爲什麼使用Object.toJSON? – 2012-02-09 19:47:21
嗯,我是http://community.spiceworks.com/plugin/9 – Zeno 2012-02-09 20:06:02