I'm trying to parse JSON file to show in table view in Swift 3 without using external frameworks, but my knowledge in Swift is not enough. I have looked other questions, but nothing worked for me. The problem is that in my JSON there are couple of nested arrays. Here is example of the JSON file:
"guides" : [
{
"name" : "First Guide",
"sections" : [
{
"title" : "Controls",
"data" : [
{
"value" : "controls.PNG",
"type" : "image"
},
{
"value" : "Sensitivity: Changes the sensitivity of the camera when turning.",
"type" : "text"
},
{
"value" : "Invert Y-Axis: Toggles inversion of camera when looking up/down.",
"type" : "text"
},
{
"value" : "crosshair.PNG",
"type" : "image"
},
{
"value" : "Lefty : Toggles the D-pad being on the left/right side of the screen.",
"type" : "text"
},
{
"value" : "Swap Jump and Sneak : Chooses whether to swap the position of jump and sneak buttons.",
"type" : "text"
},
{
"value" : "Button size - Changes the size of the buttons. Smaller buttons allow extra slots for the hotbar.",
"type" : "text"
}
]
},
{
"title" : "User Profile",
"data" : [
{
"value" : "profile.png",
"type" : "image"
},
{
"value" : "Use Cellular Data: Gives the Player the option to use cellular data.",
"type" : "text"
}
]
},
{
"title" : "Global Resources",
"data" : [
{
"value" : "resources.png",
"type" : "image"
},
..............
How I get parse the data into Swift arrays and use it to be displayed in UITableView controller. There are couple of "guides" in this JSON and I need to be able to show only one of them at the time. Help will be much appreciated. Thank you in advance.