Can someone point me in the right direction for using dictionary style tables as a database? I'm trying to organize data in tables that I can extract with some interative function (ipairs or a do loop) but I'm not sure how to set this all up.
Basically here's what I have
{NAME = "Item A", LENGTH = "25", WIDTH = "12", HEIGHT = "8", TYPE = "box"}
{NAME = "Item B", LENGTH = "11", WIDTH = "18", HEIGHT = "4", TYPE = "bag"}
{NAME = "Item C", LENGTH = "19", WIDTH = "11", HEIGHT = "2", TYPE = "bag"}
{NAME = "Item D", LENGTH = "12", WIDTH = "15", HEIGHT = "1", TYPE = "box"}
{NAME = "Item W", LENGTH = "20", WIDTH = "14", HEIGHT = "9", TYPE = "box"}
Then I want to able to cycle through each of these rows and pick out individual variables.
So maybe I want to add up all the WIDTH of everything that's a box. I'd need to iterate through each Item, check if it's TYPE = Box, and if it is, recall the WIDTH field.
Suggestios?