递归
var a = '{"renderer":"@@com.fProgress","filter":{"type":"list","store":"@@com.makeDs(com.D.marketProgress)","labelField":"name","idField":"value"}}' var b = Ext.JSON.decode(a); var arr = []; function find(obj, fuhao) { for (var k in obj) { if (obj.hasOwnProperty(k)) { if (typeof obj[k] === "object") { //console.log(k+'###'+'[Object]') find(obj[k], fuhao); } else { //console.log(k + '####' + obj[k]) if (obj[k].indexOf(fuhao) !== -1) { //找到包含该符号的值 arr.push(obj[k]) //console.log(obj[k]+"find fuhao") } } } } } find(b, "@@");