Typically, if we work with the API Social. networks, the data comes to us in the .json format and we need to work with the data contained within this document.
To work with this data is very simple, in most cases the data in the document are contained in the form of arrays or dictionaries.
For example, we received data in this form:
let json = “” “{// the first parenthesis opens the object
“data”: [// square bracket denotes an array
{// and this is again an object, that is, we get an array of objects
“username”: “RabbiFox”, “full_name”: “RabbiFox” // and in this array there are two lines, one of them we need to get, an example on the picture
}],} “” “
Everything is ingeniously simple ?
IOS app developer programming to Swift language