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

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -