@LDP - @samliew has a perfect solution for this and well done to both of you to get it working. Can I suggest my video series for Make Newbies that will take you through a whole set of fun videos and samples to manage data structures like this?
It will help you immensely as you continue your Maker journey.