I have an app that stores data in a tree structure, which I\'d like to persist to Firebase.
Each node in the tree are like this:
node:
si
I reorganized my data structure to store the 'data' field separately, to make the tree structure small enough to fit entirely on the client side. For each node in the tree, I use the path that leads to the node as the key to store the 'data'. For example,
root:
2:
0:
3:
size: 123
data: [ //list of items ]
is stored as:
root:
2:
0:
3:
size: 123
data:
203: [ // list of items ]
In this way, I can selectively load each node's data by using the path to that node as the key.