1
I have a database something like this:
{
"status": "OK",
"data": [
{
"id": 1,
"name": "Mike",
"informations": [
{
"id": 474,
"text": "My son",
"reference": "www.google.com",
}
]
}
I’m looking for this data through the Alamofire. I would like to create a View, insert a Label and, in this Label, appear the text of the attribute "text" and in another Label, the name of the attribute "name" and another with the value "reference". What’s the best way to do that?
But the bank in question I recover as an API. Is there any difference? And how would it look if there were more than one dictionary within the attribute "informations"?
– Rodrigo Fuscaldi
You asked how to access one dictionary inside the other, which I already answered. If you want to know how to convert your data (JSON string - server response) to Dictionary
[String: Any]
, you need to convert Data (String UTF8) to dictionary usingNSJSONSerialization
Jsonobject from data– Leo Dabus
http://stackoverflow.com/a/39462969/2303865
– Leo Dabus
Thanks Leo, I’ll test what happened to me! D
– Rodrigo Fuscaldi