I am trying to get a JSON response from an API, the issue I am having is that I am trying to parse through the JSON, and I keep getting this error
Cannot subscript a value of type 'String' with an index of type 'String'
This is after I am getting my response using Alamofire:
AF.request("http://localhost:8080/todos").responseJSON { response in
print(response.description["username"])
}
But when I try to parse using:
print(response.description["username"])
That is when I end up getting the error, I was wondering if I am doing something wrong, or am I missing a step