我有以下字符串:如何將NSString對象轉換爲Objective-C中的數組?
{"list": {"array":[{"current_rate":20.0,"id":1, "name": "abc"},
{"current_rate":20.0,"id":2, "name": "xyz"}]}}
我想上面的字符串轉換成數組一樣
[current_rate: 20.0, id: 1, name: abc]
我用componentSeperatedByString:@":".
但它給問題時name字段包含 「:」 字符串。
有什麼辦法可以將上面的字符串轉換爲數組。
我認爲它應該幫助你 [#1] [1] [1]:http://stackoverflow.com/questions/9955009/how-to-convert-nsmutablearray-objects -nsstring-data-into-lowercase-in-ios –