I am using Google api in an iOS app. The response is like this:
{
"result":[]
}
{
"result":[
{
"alternative":[
{
"transcript":"hello hello",
"confidence":0.94471323
},
{
"transcript":"Hello-Hello"
},
{
"transcript":"hello jello"
},
{
"transcript":"hello hello hello"
},
{
"transcript":"hello hello."
}
],
"final":true
}
],
"result_index":0
}
I am getting the data but how to parse this response?
I converted it to a NSString
. But I need the valid result in NSArray
of NSDictionary
.
NSString *responseString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
This gives me the string result but how to convert it to NSDictionary
?