Quantcast
Channel: Retrieve a JSON feed using jquery getjson? - Stack Overflow
Viewing all articles
Browse latest Browse all 5

Retrieve a JSON feed using jquery getjson?

$
0
0

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 }$(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                console.log(description);            }        });    });

Shouldn't this return "Input 1" since that is the description?


Viewing all articles
Browse latest Browse all 5

Latest Images

Trending Articles





Latest Images