I'm looking for the simplest method to store parent child data in memory for manipulation. There will be approx 100 parents, 20 children and 30 grand-children and only the number of parents will change, all child and grand-child properties will be known before compiling. I would like to access the grand children data using the parent ID and property name as a key. I could use a simple class with 200 odd properties, but I'm sure there's a more efficient method.
I've come across nested dictionaries/classes/structures/tuples, lists of lists, lists of arrays, json, non-binary trees etc but most posts are several years old and I'm not sure which method is best.
Please can anyone suggest which method to use or if there's a good library available?
ID (1 to 100)
|
param 1 param 2 param 3 param 4.....param 20
-val 1 -val 1 -val 1 -val 1 -val 1
-val 2 -val 2 -val 2 -val 2 -val 2
-val 3 -val 3 -val 3 -val 3 -val 3
...
-val 30 -val 30 -val 30 -val 30 -val 30