I am supposed to get the Json Object in specific format like
var dataObject = eval('[{"columns":[{ "title": "NAME"}, { "title": "COUNTY"}],"data":[["John Doe","Fresno"],["Billy","Fresno"],["Tom","Kern"],["King Smith","Kings"]]}]');
Till now I have always returned string from Server side in various format and consumed it in UI using Ajax. How to create Json object and send it to UI in the above shared format ?
JSON structure:
[{
"columns": [{
"title": "NAME"
}, {
"title": "COUNTY"
}],
"data": [
["John Doe", "Fresno"],
["Billy", "Fresno"],
["Tom", "Kern"],
["King Smith", "Kings"]
]
}]