iphone - Swift: convert string into integer -
this question has reply here:
get integer value string in swift 9 answersi'm getting json info different info types. want convert string '22' integer 22.
i have code: jdata["id"]
i have tried: let id = jdata["id"]! int
but gave me error
exc_breakpoint (code=exc_arm_breakpoint,subcode=0xdefe)
can please solve problem...
thanks
pass jdata["id"] string , utilize toint():
let id = string(jdata["id"]).toint() iphone xcode swift int
No comments:
Post a Comment