IOS/Objective-C: Get Number from JSON -
i have json dictionary contains call integer (in mathematics) i.e. 1.
i save number core data attribute nsinteger. following code issuing warning:
incompatible pointer integer conversion initializing nsinteger expression of type 'id'
nsinteger insertid = jsonresults[@"insert_id"]; i have tried various combinations of int, nsnumber, etc. no avail. can suggest right way this?
nsdictionary can't store nsinteger. storing nsnumber. need unwrap nsnumber:
nsinteger insertid = [jsonresults[@"insert_id"] integervalue];
Comments
Post a Comment