I want to create a dictionary with the next structure, for sending it via Alamofire as JSON to a server:
{
"user": {
"firstName": "fName",
"lastName": null,
"img": null,
"books": [
{
"id": 1
}, {
"id": 2
}
]
},
"locale": "en",
"gender": "male"
}
For this structure of JSON, I've tried the next:
let parameters: [[String: [String: String]], [String: String]]
but there a lot closures, so I confused with it. Can you help me with creating this structure?