nodejs server side nested data

nodejs server side nested data

JamesWaldronJamesWaldron Posts: 5Questions: 2Answers: 0

Using nodejs for server side processing. The database table has a couple of columns which contain JSON strings. How can I parse that JSON server side and return it to the client as individual fields along with the non JSON fields. I've seen this https://editor.datatables.net/docs/1.7.4/nodejs/classes/_nesteddata_.nesteddata.html
but can't find any examples on how to use it.

Answers

  • allanallan Posts: 63,499Questions: 1Answers: 10,471 Site admin

    I'm afraid what you are looking for isn't currently within the scope of features that the Editor Node libraries provide. The libraries treat each column in the database as a field value, so you could potentially use the nested JSON as a value for a field, but it couldn't be used as the value for multiple fields, since it can't be written back that way (not by these libraries anyway).

    This is one area where you would need to use some custom code on the server-side to get it working with your column JSON strings.

    The NestedData class you found in the documentation is a base class used by the libraries to allow nested JSON structures to be built, e.g. for joins. It isn't applicable for your use case I'm afraid.

    Allan

This discussion has been closed.