192
rated 0 times
[
198]
[
6]
/ answers: 1 / hits: 18619
/ 9 Years ago, mon, december 7, 2015, 12:00:00
I have the following ajax call and the json feed it returns. how do I get the value of the data object i.e. FRI from the feed using jquery?
$.ajax({
url: query,
type: GET,
dataType: json
success: function(data) {
var day = // get data value from json
$(#Day).val(day);
}
});
{
name:workdays,
columns:[
day
],
data:[
[
FRI
]
]
}
* update *
What would be the syntax be if the results were returned as jsonp as follows, how can you extract the value 'FRI' :
import({
Results:{
work_days:{
empid:100010918994,
day:FRI
}
}
});
More From » jquery