Load resources from API REST


Hy all,

I’m in troble with loading and or using resources data from gantt.load("/resources"):
I think that is not clear to me the exact sintax of this json object, in case of tasks and links, perfect functionality my server returns a json with two keys with list value, what about resource json?
I tried {“resources”:[{},{}…]} , also appending key resources in data object but I’m not able to use it.
Any hint?


Hello Mauro,
To load the resources along with tasks from the same JSON object, you need to include the resource data inside the collections object:
Before loading the data, you need to create a server list so that Gantt will fill it when parsing the data with the gantt.parse method:
After that, you can use the parse method from the resource store object to load the resource data.
Here is an example of how it can be implemented: