请问在以下json字符串中怎么取得result的值

{"age":null,"city":null,"country":null,"falg":"成功","idCard":null,"list":null,"name":n... {"age":null,"city":null,"country":null,"falg":"成功","idCard":null,"list":null,"name":null,"nickname":null,"phone":null,"result":"添加成功","sex":null,"userInfo":{"age":null,"appid":null,"assessor":null,"city":null,"country":null,"fall":null,"headimgurl":null,"id":74,"idCard":null,"name":null,"nickname":null,"phone":null,"province":null,"sex":null},"userInfoDao":{}} 展开
 我来答
yugi111
2015-03-14 · TA获得超过8.1万个赞
知道大有可为答主
回答量:5.1万
采纳率:70%
帮助的人:1.3亿
展开全部
var str = '{"age":null,"city":null,"country":null,"falg":"成功","idCard":null,"list":null,"name":null,"nickname":null,"phone":null,"result":"添加成功","sex":null,"userInfo":{"age":null,"appid":null,"assessor":null,"city":null,"country":null,"fall":null,"headimgurl":null,"id":74,"idCard":null,"name":null,"nickname":null,"phone":null,"province":null,"sex":null},"userInfoDao":{}}';

var obj = eval("(" + str + ")");

obj["result"]
追问
success:function(json){

var obj= $.parseJSON(json);//使用这个方法解析json
var s=obj.result;//result 和action中定义的result变量的get方法对应的
//alert(s);
},我写的
这是ajax 怎么取出result的值,上面是firebug
的响应值
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式