<script type="text/javascript"> getJson('age'); function getJson(key){ var jsonObj={"name":"傅红雪","age":"24","profession":"刺客"}; //1.使用eval方法 var eValue=eval('jsonObj.'+key); alert
本例将通过location.search来进行字符串拼接成json以及查询域名参数的value console.log(request('id')); function request(obj){ var str = 'http://www.baidu.com?staticType=0&type=1&id=123abc'; var str = str.substring(str.indexOf('?')+1); var arr = str.split('&'); var str1
关键字:Set Variable Get Json Value to json Get From Dictionary 具体关键字用法不再说明,可百度一下: 例:下面是某一个请求页面Response返回的数据,如下: {"id":"1496654252","code":0,"msg":"ok","data":{"tag_list&q