JSFiddle - React, Tailwind, and code Playground

by Tiago Crizanto

JavaScript

var json = [
    {
      "id": 1785,
      "title": "root",
      "children" : [
          {
              "id" : 351,
              "title" : "Title",
              "children" : [
                  {
                    "id": 4356,
                    "title" : "Title-1",
                    "cells" : [
                        {
                            "id": 1,
                            "year": 2020,
                            "month" : 1,
                            "value": 6.1
                        },
                        {
                            "id": 1,
                            "year": 2020,
                            "month" : 2,
                            "value": 6.2
                        }
                    ]
                },
                {
                    "id": 1891,
                    "title" : "Title-2",
                    "children" : [
                        {
                            "id": 4991,
                            "title" : "Title-2-1",
                            "children": [
                                {
                                    "id": 7385,
                                    "title" : "Title-2-1-1",
                                    "children": [
                                        {
                                            "id": 8146,
                                            "title" : "Title-2-1-1-1",
                                            "children" : [
                                                {
                                                    "id": 12123,
                                                    "title" : "Title-2-1-1-1-1",
                                                    "cells" : [
                                                        {
                                                            "id": 1,
                                                            "year": 2020,
                                                        ...