I'm storing year/month/day info into a nested dictionary. For the life of me, I can't figure out the syntax to read the day info back out. It's structured like this:
var dict = [String:[[String:[String]]]]()
dict["2016"] = [["Sep":["1","6","20"]]]
dict["2016"]? += [["Oct":["2"]]]
dict["2017"] = [["Jan":["3","7"]]]
dict["2017"]? += [["Feb":["4","19"]]]I thought that I could read the day for an entry like this:
dict["2016"]?[["Sep"]] // errorBut that gives me the error "Cannot subscript a value of type '[[String: [String]]]' with an index of type '[String]'
I know there are probably better ways of structuring this data, but I'd love to know how to handle this!
Thanks