The best way to organise table with categories and nested subcategories (tree structure)

Helo Xano!

I try to make a table with product categories which should be a tree
 f.e.

categor 
• subcat list • subcat etc...

and I will like lowest level of subsubsub...category to my products

and in GET endpoint I want it to be array with nested arrays in objects so 1 endpoint will return all tree for filtering reason...

and easily to work with lowest level of tree (subsubsubcat..) easily like select, search etc..

is there any best practices which fits the most for Xano?
I dont want to have separate linked tables for each level of tree

or have each column for each level, or have like 1.1, 1.1.1 where 1 is row in same column or soo.. 

Thank you
Other
1 reply