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

Popular posts from this blog

java - unable show chart in xls document using jasper reports -

javascript - How to change image src on success AJAX -

java.lang.RuntimeException: Could not generate dummy secret at sun.security.ssl.RSAClientKeyExchange.<init> -