Created
March 27, 2016 02:55
-
-
Save bgayman/d1221fe5fbe634d7d5a1 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
let objects:Array<Dictionary<String, AnyObject>> = [["id": NSNull(), "born": 1964, "name": "Keanu Reeves"], ["id": NSNull(), "born": 1967, "name": "Carrie-Anne Moss"], ["id": NSNull(), "born": 1961, "name": "Laurence Fishburne"], ["id": NSNull(), "born": 1960, "name": "Hugo Weaving"], ["id": NSNull(), "born": 1967, "name": "Andy Wachowski"], ["id": NSNull(), "born": 1965, "name": "Lana Wachowski"], ["id": NSNull(), "born": 1952, "name": "Joel Silver"], ["id": NSNull(), "born": NSNull(), "name": "Ann"], ["id": NSNull(), "born": NSNull(), "name": "Dan"]] | |
let object = objects[1] | |
print("Object is: \(objects)") | |
print("Hello") | |
print(object["name"]?.classForCoder) | |
let text = object["name"] as! String | |
print(object["born"]?.classForCoder) | |
let text2 = object["born"] as! Int |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment