I am getting an error when I try to add a new object to dataArray. This is how I define dataArray.
-(NSMutableArray *)dataArray{
i
One of the values you're trying to insert is coming back nil, which means attributeDict does not contain either a "level" or "probability" key. The string should not be nil even if it's provided with nil arguments, they just display as (nil).
Your argument to addObject: is likely nil.
Test it:
assert(attributeDict);
assert([attributeDict objectForKey:@"level"]);
assert([attributeDict objectForKey:@"probability"]);
I fixed it. I misspelled a variable name.