我的结果为[{"BlockRefHandle":"11B67"}]
。
我们如何提取数据11B67
?
$.ajax({
type: 'POST',
url: url,
data: getDatawithToken(params),
dataType : 'json', // expecting json returned from server
success: function (result) {
alert("success");
if (result.d.length > 0) {
// access first element
alert(result.d[0]);
}
}
});
答案 0 :(得分:1)
您可以通过访问属性BlockRefHandle
来提取所需的值,如下所示:
$.ajax({
type: 'POST',
url: url,
data: getDatawithToken(params),
dataType : 'json', // expecting json returned from server
success: function (result) {
alert("success");
if (result.length > 0) {
// access first element
alert(result[0].BlockRefHandle);
}
}
});