hello
i have JSON data and i want to dispay in html.i get some error.
i have JSON data like=
[1]
0:
{
Id: "72c8d71f-5b3f-4812-98db-346df89ed9d7"
KeyWord: "Exam"
Value: " ??????"
UseInSentence: "This is Tough Exam"
WordType: "noun"
}
Below My JavaScript
function Go() {
$.getJSON('http://localhost:12702/api/WordDictionaryE2M?word=' + $('#txtSearch').val(), function (data) {
$('#div').text(data);
});
}
$.getJSON('http://localhost:12702/api/WordDictionaryE2M?word=' + $('#txtSearch').val(), function (data) {
$('#div').text(data);
});
}
And I get Error like=
[object Object]
PrakashPosted Jul 11, 2015, 9:59 AM
Nilesh JadavPosted Jul 11, 2015, 9:47 AM
$.getJSON("http://free.worldweatheronline.com/feed/weather.ashx?q=City,Country&callback=?&format=json&num_of_days=2&key=1111111111111111",function(data){
console.log(data)
})
OR:
var mydata;
$.ajax({
url: 'http://free.worldweatheronline.com/feed/weather.ashx?q=City,Country&callback=?&format=json&num_of_days=2&key=1111111111111111',
dataType: 'jsonp',
success: function (data) {
mydata = data;
console.log(mydata);
}
});
http://stackoverflow.com/questions/28650150/javascript-json-object-object-error