<script type="text/javascript"> getJson('age'); function getJson(key){ var jsonObj={"name":"傅红雪","age":"24","profession":"刺客"}; //1.使用eval方法 var eValue=eval('jsonObj.'+key); alert
var keyMap = { deviceUid: "id", deviceType: "typeName", deviceCode: "code", deviceName: "name", deviceStatus: "status" }; for (var i = 0; i < data.confList.length; i++) { var obj = data.confList[i]; for
function compare(name, minor) { return function (o, p) { var a, b; if (o && p && typeof o === 'object' && typeof p === 'object') { a = o[name]; b = p[name]; if (a === b) { return typeof minor === 'function' ? minor(o, p) : 0; } if