> On 26 Mar 2015, at 07:40, Akram Moncer <
akram....@gmail.com> wrote:
>
> thank you all for your responses :
>
> my exact problem is :
>
> using this expression : let phoneNumbers = jsonDictionary["phoneNumbers"]
>
> i get an optional containing all the phone numbers list but when i try to get specific one exp: phoneNumbers[0] i get an exception "bad access"
You'll have to
a) unwrap the optional
b) cast the unwrapped phoneNumbers to an array of strings.
Then you can subscript it.
>
> Le mercredi 25 mars 2015 20:45:47 UTC+1, Akram Moncer a écrit :
> Hi All
>
> How can i parse this type of json to get the list of phone numbers :
> {
> "
> phoneNumbers":
> [
>
> "(555) 564-8583","(555) 564-8584"
> ]
> }
>
>
>
> thanks
>
> To view this discussion on the web visit
https://groups.google.com/d/msgid/swift-language/e37ac6d6-e5ce-4538-ba3f-3bf5b9ae8ad3%40googlegroups.com.