gpt4 book ai didi

javascript - 如何计算javascript中的json对象

转载 作者:行者123 更新时间:2023-11-29 15:32:42 25 4
gpt4 key购买 nike

<分区>

如何计算我请求的对象?

我正在使用 ajax 并向此网址请求 json 数据 pbxApi+"/conference/participants/"+circle+"/"+data.conference+"/"+data.uniqueid+'?jsonp=response';,我想计算响应的对象。

这是我的代码

 var uri = pbxApi+"/conference/participants/"+circle+"/"+data.conference+"/"+data.uniqueid+'?jsonp=response';
getJsonData(uri, function(res){
console.log(res.length);
});

这是我的功能:

  var getJsonData = function(uri,callback){
$.ajax({
type: "GET",
dataType: "jsonp",
url: uri,
jsonpCallback: 'response',
cache: false,
contentType: "application/json",
success: function(json){
callback(json);
}
});
}

这是我的回答

response({"_id":"561713a78693609968e3bbdd","event":"ConfbridgeJoin","channel":"SIP/192.168.236.15-00000024","uniqueid":"1444352918.94","conference":"0090000293","calleridnum":"0090000288","calleridname":"0090000288","__v":0,"status":false,"sipSetting":{"accountcode":"0302130000","accountcode_naisen":"201","extentype":0,"extenrealname":"UID1","name":"0090000288","secret":"Myojyo42_f","username":"0090000288","context":"innercall_xdigit","gid":101,"cid":"0090000018"}})

谢谢:)

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com