I have the following ajax call and it returns json. how to get the value of a data object, i.e. FRI from a pipe using jquery?
$.ajax({
url: query,
type: "GET",
dataType: "json"
success: function(data) {
var day =
$("#Day").val(day);
}
});
{
"name":"workdays",
"columns":[
"day"
],
"data":[
[
"FRI"
]
]
}
* update *
What will be the syntax if the results were returned as jsonp as follows, how can you extract the value "FRI":
import({
"Results":{
"work_days":{
"empid":100010918994,
"day":"FRI"
}
}
});
source
share