How can i count the object of my request?
I am using ajax and requesting json data to this url pbxApi+"/conference/participants/"+circle+"/"+data.conference+"/"+data.uniqueid+'?jsonp=response'; and i want to count the object of the response .
This is my code
var uri = pbxApi+"/conference/participants/"+circle+"/"+data.conference+"/"+data.uniqueid+'?jsonp=response'; getJsonData(uri, function(res){ console.log(res.length); }); This is my functiion:
var getJsonData = function(uri,callback){ $.ajax({ type: "GET", dataType: "jsonp", url: uri, jsonpCallback: 'response', cache: false, contentType: "application/json", success: function(json){ callback(json); } }); } This is my response
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"}}) Thanks :)
jsonin the response