http://blog.csdn.net/betterbb/article/details/25984455
Fmdb stored in a dictionary or array becomes a string into SQLite, but if you do not convert it to JSON format, you will get a string that cannot be converted to a dictionary or array when you query fetch data.
Convert JSON storage:
Nsarray *picarr = (Nsarray *) dic[@ "pic"];
Nserror *err = nil;
NSData *jsondata = [nsjsonserialization dataWithJSONObject:picArroptions:NSJSONWritingPrettyPrinted Error:&err] ;
NSString *jsonstr = [[NSString alloc] initWithData:jsonDataencoding:NSUTF8StringEncoding];
Get Jsonkit to convert an array or dictionary with a third-party package
Fmresultset *set = [app.db executequery:@ "SELECT * from CACHE"];
while ([Set next]) {
NSString *STR = [Set stringforcolumn:@ "Imgurl"];
Third-party Package Jsonkit Conversion
Nsarray *arr = (Nsarray *) [str objectfromjsonstring];
}
Ios_fmdb about dictionaries, array storage, and getting problems