Created
November 11, 2014 00:00
-
-
Save aGupieWare/99335bd505bc8c8d6863 to your computer and use it in GitHub Desktop.
Swift client refined JSON response . . .
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
| var rawInventoryItems = jsonResult["data"] as Array<Dictionary<String,String>> | |
| var refinedInventoryItems : Array<PlumbingSupplyItem> = [] | |
| for itemDict in rawInventoryItems { | |
| var item : PlumbingSupplyItem = PlumbingSupplyItem(bsn_id: itemDict["id"], bsn_name: itemDict["name"], bsn_image: itemDict["image"], bsn_description: itemDict["description"]) | |
| refinedInventoryItems.append(item) | |
| } | |
| return refinedInventoryItems |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment