Deep Data JSON
Deep Data JSON
The below code only works when I remove the first top level JSON object (requestStatus). I have tried every premutation I can think of and found examples for but can't seem to get
to the overview.feedOverview data no matter what, unless of course I remove the first object all-to-gether. Has anyone seen this?
[code]
$(document).ready(function() {
$('#example').dataTable( {
"bFilter": false,
"bPaginate": false,
"bInfo": false,
"bJQueryUI": true,
"bSort": false,
"bProcessing": false,
"sAjaxSource": "http://localhost:9000/MyApp/api/rest/overview/getOverview",
"sAjaxDataProp": "overview.feedOverview",
"aoColumns": [
{"sTitle": "Status", "mDataProp": "status" },
{"sTitle": "Record", "mDataProp": "recordingStatus" },
{"sTitle": "Feed", "mDataProp": "feedName" },
{"sTitle": "Mission", "mDataProp": "missionName" },
{"sTitle": "Start Time", "mDataProp": "startTime" },
{"sTitle": "Stop Timie", "mDataProp": "stopTime" }
]
} );
});
[/code]
// JSON
{
"requestStatus": {
"status": "OPERATION_COMPLETE",
"errorText": null
},
"overview": {
"feedOverview": [
{
"status": "RUNNING",
"recordingStatus": "STOPPED",
"picteId": "1323467287",
"feedName": "Predator",
"missionName": "AnotherMission",
"startTime": "2011-12-09T16:00:00",
"stopTime": "2011-12-09T20:00:00"
},
{
"status": "RUNNING",
"recordingStatus": "STOPPED",
"picteId": "1323468370",
"feedName": "Predator2",
"missionName": "Hello",
"startTime": "2011-12-09T16:00:00",
"stopTime": "2011-12-09T20:00:00"
}
]
}
}
to the overview.feedOverview data no matter what, unless of course I remove the first object all-to-gether. Has anyone seen this?
[code]
$(document).ready(function() {
$('#example').dataTable( {
"bFilter": false,
"bPaginate": false,
"bInfo": false,
"bJQueryUI": true,
"bSort": false,
"bProcessing": false,
"sAjaxSource": "http://localhost:9000/MyApp/api/rest/overview/getOverview",
"sAjaxDataProp": "overview.feedOverview",
"aoColumns": [
{"sTitle": "Status", "mDataProp": "status" },
{"sTitle": "Record", "mDataProp": "recordingStatus" },
{"sTitle": "Feed", "mDataProp": "feedName" },
{"sTitle": "Mission", "mDataProp": "missionName" },
{"sTitle": "Start Time", "mDataProp": "startTime" },
{"sTitle": "Stop Timie", "mDataProp": "stopTime" }
]
} );
});
[/code]
// JSON
{
"requestStatus": {
"status": "OPERATION_COMPLETE",
"errorText": null
},
"overview": {
"feedOverview": [
{
"status": "RUNNING",
"recordingStatus": "STOPPED",
"picteId": "1323467287",
"feedName": "Predator",
"missionName": "AnotherMission",
"startTime": "2011-12-09T16:00:00",
"stopTime": "2011-12-09T20:00:00"
},
{
"status": "RUNNING",
"recordingStatus": "STOPPED",
"picteId": "1323468370",
"feedName": "Predator2",
"missionName": "Hello",
"startTime": "2011-12-09T16:00:00",
"stopTime": "2011-12-09T20:00:00"
}
]
}
}
This discussion has been closed.
Replies
Allan
/*
* File: jquery.dataTables.js
* Version: 1.8.2
* Description: Paginate, search and sort HTML tables
* Author: Allan Jardine (www.sprymedia.co.uk)
* Created: 28/3/2008
* Language: Javascript
* License: GPL v2 or BSD 3 point style
* Project: Mtaala
* Contact: allan.jardine@sprymedia.co.uk
Thx. so very much for responding.
Thanks for the feedback!
Allan