Hello,
I have a plist, with main NSDictionary, in which its keys are dates. For every date, I have a NSDictionary in which the keys are (let's say) categories. Every Category holds Keys and values.
I would like to create 2 variables that each will hold the correct NSDictionary:
NSDictionary *dates = ?
NSDictionary *Categories = ?
Below is my plist, please help to understand how this should be done.
**Note: I do know how to assign the first dates dictionary from the plist... just stuck with the Categories.
NSDictionary *dict = [[NSDictionary alloc]initWithContentsOfFile:path];
self.dates = dict;
[dict release];
The plist:
<dict>
<key>2010-05-08</key>
<dict>
<key>Catergory1</key>
<dict>
<key>key1</key>
<string>value1</string>
<key>key2</key>
<string>value2</string>
<key>key3</key>
<string>value3</string>
</dict>
<key>Catergory2</key>
<dict>
<key>key1</key>
<string>value1</string>
<key>key2</key>
<string>value2</string>
<key>key3</key>
<string>value3</string>
</dict>
<key>2010-01-02</key>
<dict>
<key>Catergory1</key>
<dict>
<key>key1</key>
<string>value1</string>
<key>key2</key>
<string>value2</string>
<key>key3</key>
<string>value3</string>
</dict>
<key>Catergory2</key>
<dict>
<key>key1</key>
<string>value1</string>
<key>key2</key>
<string>value2</string>
<key>key3</key>
<string>value3</string>
</dict>
</dict>
</dict>
</plist>
Any help would be greatly appreciated, as I've searched over the forum's history and found nothing that matches my scenario.
THANKS!