Answer by kalai for Retrieve a JSON feed using jquery getjson?
try this$(document).ready(function () { var data; $.ajax({ dataType: "json", url: 'http://192.168.1.2/alarm.cgi', data: data, success: function (data) { // begin accessing JSON data here...
View ArticleAnswer by KL_ for Retrieve a JSON feed using jquery getjson?
As you can see, the function to be called if the request succeeds returns you one object that's named response, which should have { "description": "Input 1", "type": "no", "enabled": true, "alarm":...
View ArticleAnswer by Arkadi for Retrieve a JSON feed using jquery getjson?
You get Shadowed variable name in your example, just don't do it.Give different name to callback parameter, response for instance:$(document).ready(function () { var data; $.ajax({ dataType: "json",...
View ArticleAnswer by Barmar for Retrieve a JSON feed using jquery getjson?
The value of data is the whole object, you need to access the description property, so it should be console.log(data.description);.
View ArticleRetrieve a JSON feed using jquery getjson?
I have been playing with this code for way too long for no solution. The url that it points to contains this (json object):{ "description": "Input 1", "type": "no", "enabled": true, "alarm": false...
View Article
More Pages to Explore .....