我有一个网络服务,它返回这样的 json 数据..
{"d":"{\"RES\":[],\"STAT\":\"FAIL\",\"SID\":\"0\"}"}
我怎样才能从中读取 STAT=FAIL。我用 C# 编写了服务。
我的脚本是
$.ajax({
type: "POST",
url: "http://localhost/EMRDMSService/Service.asmx/User_Login",
data: "{lg:" + JSON.stringify(GetLogDet) + "}",
// url: "http://localhost/EMRDMSService/Service.asmx/Permission_List",
// data: "{userid:" + JSON.stringify(GetLogDet) + "}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (r) {
console.log(r.d.STAT);
}
});
但是 rdSTAT 是undefined
? 有人可以帮我吗?