Discussions

Ask a Question
Back to All

Displaying recursive data results from an API

My api response returns data with the following structure

{
  "data": [
    {
      "id": "",
      "name": "",
      "children": [
        {
          "id": "",
          "name": "",
          "children": [
          ]
        },
        {
          "id": "",
          "name": "",
          "children": [
          ]
   		  },
      ]
    }
  ]
}

The children contains other children and so on, what is the best way to do so?