You are creating a completely new, empty JsonModel
object when you execute
JsonModel *jsonModel =[[JsonModel alloc]init];
So this instance of JsonModel
is completely unrelated to the one you created previously (and set jsonModel.idNumber
).
So ultimately what you need to do is keep the original jsonModel
object that you created, and use that same object in the view controller.