Created
August 10, 2016 02:29
-
-
Save jstart/0f678c091980827ae2a785186520532f 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
struct UserResponse { | |
var _id : String | |
var first_name : String | |
var last_name : String | |
init(JSON: [String : AnyObject]) { | |
_id = JSON["_id"] as! String | |
first_name = JSON["first_name"] as! String | |
last_name = JSON["last_name"] as! String | |
} | |
} | |
/* Inside our completion handler */ | |
var user = UserResponse(JSON: response.result.value as! [String : AnyObject]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment