Can anybody help me to tell me how can access to objects in NSMutableArray.
This is how the creation of the objects is been made:
ViewController:
Students *studens =[[Students alloc] initWithDictionary:data]; //where data is NSDictionary
[self.studentData addObject:studens]; //where studentData is a NSMutableArray
in the Students is a NSObject class. in the Students class:
-(id)initWithDictionary:(NSDictionary *)studenDictionary
self = [super init];
if (self)
{
self.studentName= [stateDictionary objectForKey:@"name"];
self.studenLastName= [stateDictionary objectForKey:@"lastName"];
self.StundenAddress= [stateDictionary objectForKey:@"address"];
}
return self;
}
if I nslog the nsmutablearray I'll get this output:
"<studens: 0x756b970>",
"<studens: 0xf46f9a0>"
my question for example how can I access the information of the student name John ?
Students
class toStudent
since each instance represents a single student.