I am getting string in response, i want to convert it into Int following is my code
Int("\(dicOtherData["active_job"])!")!
but it will giving fatal error at run time
I am getting string in response, i want to convert it into Int following is my code
Int("\(dicOtherData["active_job"])!")!
but it will giving fatal error at run time
Never force-unwrap an optional if you cannot be 100 % sure that it contains what you expect. Rather use a pattern like this: