Created
September 30, 2011 08:48
-
-
Save Nub/1253139 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if(stocks) | |
| { | |
| NSMutableDictionary *serialStocks = [NSMutableDictionary dictionary]; | |
| for (NSString *key in stocks) { | |
| NSMutableArray *serialPurchases = [NSMutableArray array]; | |
| NSArray *item = [stocks objectForKey:key]; | |
| if ([item isKindOfClass:[NSArray class]]) { | |
| for (StockPurchase *purchase in item) { | |
| NSDictionary *serialPurchase = [purchase serializeToDictionary]; | |
| [serialPurchases addObject:serialPurchase]; | |
| }//purchase in item | |
| }//if array | |
| [serialStocks setObject:serialPurchases forKey:key]; | |
| }//ket in stocks | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment