dHTMLXList add multiple fields

I’m using dHtmlX Suite 6.0 with Data Collection API.add.
Ref link
https://docs.dhtmlx.com/suite/data_collection__api__add.html
Example Code:
component.data.add([{“value”: 57.44787660011765,“id”: “u1565340894584”},{“value”: ,“id”:u1565340894585"}]);

Is it possible to add array with custom fields more than value and id.

Yes, you can use any fields you want in the JSON object. They just use value and id as a common example. I would not omit the “id” field since much of the DHX Suite operates around that id. That may already be obvious to you, but I thought it best to mention to be sure.

Since your title mentions the List component, you can look at the Templates Configuration to see how they’re making use of other fields. The “item” object is from the DataCollection; in their example it has not only “id” and “value”, but also “publishedDate”, “authors”, and “categories”. The latter two demonstrate how you can make use of arrays within the JSON object with the List component.

1 Like

Hi kcasarez,
Thank you for your reply, your provided link is exactly what I needed.