One way I’ve considered is creating a temporary array and loading the array of NSNumbers into it, then alloc the mutable array, then if loaded array is not nil or empty addObject:[NSNumber numberWithInt:[[temparr objectAtIndex:i] intValue]], but it seems such a roundabout way of doing it.
This is so that I can modify the numbers and array contents in the app.
Is there a shorter, more to-the-point method of doing the same? It’s quite common to load arrays/dicts from somewhere only to find their contents immutable, and I’d like to learn the most straightforward way.
You cannot put NSNumbers in a mutable array and expect to be able to change their values. See the code in the question for the workaround I used.