How can I use a 1D JSON array in DataTables?

How can I use a 1D JSON array in DataTables?

lanto3000lanto3000 Posts: 1Questions: 0Answers: 0
edited May 2013 in General
My ASP.NET MVC controller methods return JSON in the following format:

[
{"Id":837,"Name":"aaa"},
{"Id":838,"Name":"bbb"}
]

How can I use this without converting it to a the 2D array JSON format DataTables uses in its examples?

Replies

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    See this blog post: http://datatables.net/blog/Extended_data_source_options_with_DataTables . DataTables can you use your object, no need to convert.

    Allan
This discussion has been closed.