Skip to content
Advertisement

Need help by populating a PrimeReact Tree

I’m trying to populate a PrimeReact Tree with data from sqlite3 database, but it doesnt work.

Here is my SQL-Query:

I get following JSON-Code:

This is OK but i figured out, that the children are not rendered, because there are quotes around the square brackets at the children path – how can i fix this?

Advertisement

Answer

If initial is your json to be mapped to Tree, then you need to make a slight modification to convert string to array

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement