From ab23eadd42034cd70d8f82b76936a3825fbd3f3b Mon Sep 17 00:00:00 2001 From: Bevin Date: Thu, 9 Oct 2014 16:38:59 +0800 Subject: [PATCH] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f4007d13..01475bac 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ With SwiftyJSON all you have to do is: ```swift let json = JSON(data: dataFromNetworking) -if let userName = json[0]["user"]["name"].string{ +if let userName = json[0]["user"]["name"].stringValue{ //Now you got your value } @@ -89,7 +89,7 @@ And don't worry about the Optional Wrapping thing, it's done for you automatical ```swift let json = JSON(data: dataFromNetworking) -if let userName = json[999999]["wrong_key"]["wrong_name"].string{ +if let userName = json[999999]["wrong_key"]["wrong_name"].stringValue{ //Calm down, take it easy, the ".string" property still produces the correct Optional String type with safety }