I'm trying to figure out how to add the following data to my json object. Could someone show me how to do this.
Website Example
$(document).ready(function() {
$('#example').dataTable( {
"aoColumnDefs": [
{ "aDataSort": [ 0, 1 ], "aTargets": [ 0 ] },
{ "aDataSort": [ 1, 0 ], "aTargets": [ 1 ] },
{ "aDataSort": [ 2, 3, 4 ], "aTargets": [ 2 ] }
]
} );
} );
My JSONObject that needs to incorporate the above example.
JSONObject json = new JSONObject();
json.put("aoColumnDefs", );
See Question&Answers more detail:os