Can you give me sample or example of response structure so that i can also change my api accroding to this requirement of this tree view?
Please share with me array structure so that i can modify my api and then i will use this sample
In the sample, call myDiagram.model.toJson(), either in the debugger or in some JavaScript code. The resulting string is in JSON-formatted syntax, which is commonplace for web apps. When the server sends a model serialized in this format, you can load it by calling myDiagram.model = go.Model.fromJson(str).
Many samples show the serialized model in this format. Many of those samples also allow editing the text and loading that model, if it was correctly edited.