How to convert a JSON array into an NSArray
问题 I've been having trouble finding out how to convert a JSON array into an NSArray. I have a php script that creates an array that is converted into JSON which is then sent and stored into an NSString that looks like: [1,2,3,4] My problem is that I need to make that into an NSArray of ints. How would one do that? Thanks! 回答1: If I wanted to quickly break that into an array I would do it like this: NSString * jstring = @"[1,2,3,4]"; //your json string jstring = [jstring