Accessing data in JSON format after DataTable initilization
Accessing data in JSON format after DataTable initilization
sumitshining
Posts: 12Questions: 0Answers: 0
Hi,
I have a datatable already initialized. I can't make changes in existing code. Instead, I have to write code to access the data that is received in JSON.
I can see some data in response to the http request in JSON but can't deduce a method to retrieve it. It can be retrieved using fnGetData(i) where i is the row index but this is not json format data.
My actual requirement is to use a property value received in the data from server. So from the server I am sending it as an object embedded in the data. Any other way it can be retrieved?
I have a datatable already initialized. I can't make changes in existing code. Instead, I have to write code to access the data that is received in JSON.
I can see some data in response to the http request in JSON but can't deduce a method to retrieve it. It can be retrieved using fnGetData(i) where i is the row index but this is not json format data.
My actual requirement is to use a property value received in the data from server. So from the server I am sending it as an object embedded in the data. Any other way it can be retrieved?
This discussion has been closed.
Replies
Allan
Now, since the data is in array form even if I pass the data as object it goes into an array and ultimately I end up at same problem. Probably the solution you provided to opt for Object rather than array might help.
Please link to a test case: http://datatables.net/forums/discussion/12899/post-test-cases-when-asking-for-help-please-read
Allan