Hi all, I've set up a multi-dimensional dictionary, there my main dictionary is "kids".
Then the keys in there, are the names of the kids, let's say "JOE", "PETE", "MARY" and "SUE".
Now each of these kids names are actually another dictionary with details, so each kid has different attributes.
Example
DICT - VALUE - DICT - VALUE
KIDS - JOE - AGE - 8
KIDS - JOE - MARBLES - 12
KIDS - PETE - PET - GOLDFISH
KIDS - PETE - SIBLINGS - 2
KIDS - MARY - AGE - 10
KIDS - MARY - MARBLES - 9
KIDS - MARY - PET - DOG
KIDS - SUE - MARBLES - 7
KIDS - SUE - PET - CAT
KIDS - SUE - SIBLINGS 0
now I can find out Joe's age by saying:
DEBUG.PRINT KIDS("JOE")("AGE")
or Mary's pet by saying:
DEBUG.PRINT KIDS("MARY")("PET")
and that works fine.
But I want to figure out how many marbles they have combined.
So essentially:
KIDS(ALL_OF_THEM)("MARBLES")
Can that be done without looping through them?
Thanks!
Bookmarks