{"aps":{
"alert":"New Test For The Win",
"sound":"default"
},
"fk_device":"1513"
}
我有这个 JSON NSString。如何解析这个 JSON 字符串并获取 fk_device 值?
你可以试试这个库JSONKit。要获取字符串,您可以执行以下操作:
NSDictionary *deserializedData = [jsonString objectFromJSONString];
NSString *string = [deserializedData objectForKey:@"fk_device"];