I'm new to Swift, sorry if this is a dumb question... there seem to be many questions about this but I can't find my answer I need to get an array of array
here is my request
Alamofire.request(url, method: .post, parameters: parameter, encoding: JSONEncoding.default).responseJSON {
response in
switch response.result {
case .success:
var resp = JSON(response.value as! NSDictionary)
id = resp["Data"].arrayValue.map({$0["Id"].stringValue})
name = resp["Data"].arrayValue.map({$0["Name"].stringValue})
break
case .failure(let error):
print(error)
}
and here's the JSON response:
{
Data =(
{
Id = "u1";
Name = "user 1";
Users =({
FullName = "aaa";
UserName = "aaa";
}
);
},
{
Id = "u2";
Name = "user 2";
Users =({
FullName = "bbb";
UserName = "bbb";
},
{
FullName = "ccc";
UserName = "ccc";
}
);
})}
I have no problem to get arrays of id and name but I don't know how to get array of users, any help?