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"
}
}
});
data.data?