Hello friends I have found this problem and for more than I wanted to solve it I could not, I need to take the data from a .csv file and export it to a json, but this must be grouped in a recursive way an example would be the following:
The result:
labels: [
{
label: 'Camion',
children: [
{
label: '6002577',
},
'6008971',
'6008979'
]
},
{
label: 'Delivery',
children: ['6001265', '6001273', '6001458', '6001466', '6001587', '6001595', '6002570', '6002578', '6008972', '6008980']
},
{
label: 'Moto',
children: ['6001263', '6001271', '6001459', '6001467', '6001588', '6001596', '6002568', '6002576', '6008973', '6008981']
}
]
The .csv data is dynamic and can have n columns and n records