jquery - How to get json in javascript or ajax -
i have json data
how can data using javascript
thanks :)
this code
var getjsondata = function(uri,callback){ $.ajax({ type: "get", datatype: "jsonp", url: uri, jsonpcallback: 'response', contenttype: "application/json", success: function(json){ console.log(json); callback(json); } }); }
var uri = pbxapi+"/confbridge_participants/conference_participants.json?cid="+circle; getjsondata(uri, function(res){ }
var uri = pbxapi+"/confbridge_participants/conference_participants.json?cid="+circle; getjsondata(uri, function(res){ var data = json.parse(res); for(var objectindex=0; objectindex < data.length; objectindex++){ var tempobject = data[objectindex]; var id = tempobject.id; var uid = tempobject.uid; .... var updated_at = tempobject.updated_at; } }
Comments
Post a Comment