Disclaimer: I'm completely new to swift/xcode so apologies if I'm not articulating this question well. Here goes...
I'd love some advice as to what would be the best data type for the following.
I have a large amount of images that need levels of categorisation (let's call them category, subCategory and subSubCategory for lack of a better word)
Each category has any number of subCategories and each subCategory has any number of subSubCategories. A subSubCategory can only belong to one subCategory and a subCategory can only belong to one category.
I need to be able to create arrays on the fly of images based on a selected category, subCategory or subSubCategory.
Therefore, I need to be able to access a list of subCategories from a given category etc so the categories need to be defined with the rules above applied (as opposed to just strings arbitrarily assigned) .
I have tried to play around with enums but it doesn't seem to be the best fit or at least a very "hacky" way of attempting to nest them.
Is there an obvious solution I'm missing?
Many thanks in advance