I am making a post request with following params in HTTPBody:
filter:{“name”:"john”,”city”:”NY"}
I googled it but couldn't find the syntax
let params : [Dictionary<String,Dictionary<String,String>>]
= [
[
"filter" : [
"name":"john",
"city":"NY"
]
]
]
requestURL.HTTPBody = try NSJSONSerialization.dataWithJSONObject(params, options: [])
Could you please help me setting the above params in Swift code? Is there any syntax to put those params in HTTPBody?