Question: I'm trying to get information out of this Dictionary that was created from a JSON string. The JSON string is returned from the server and is put in a dictionary. That dictionary is passed to myMethod that is suppose to break it down so I can get the information that each record contains. 

The "Recordset" is an Array. The Record is also an array of dictionaries. 

How do I get to the dictionaries? I keep getting ***NSDictionaryM objectAtIndex: unrecognized selector sent to instance*** 

```
Recordset =     (
     {
     Record =             (
        {
            MODMAKlMakeKey = 1112;
            MODlModelKey = 1691;
            MODvc50Name = "10/12 Series 2";
     },
     {
            MODMAKlMakeKey = 1112;
            MODlModelKey = 1687;
            MODvc50Name = "10/4";
     },
     {
            MODMAKlMakeKey = 1112;
            MODlModelKey = 1686;
            MODvc50Name = "10/6";
     },

```

etc .. etc... ( about 100 records )

**Here is what I have**

```
- (void) myMethod : (NSDictionary*) dictionary {

    //INITIAL
    NSArray * arrRecordSet   = [dictionary objectForKey:@"Recordset"];
    NSArray * arrRecord      = [arrRecordSet objectAtIndex:0];
    NSDictionary * theRecord    = [NSDictionary dictionaryWithObjects:arrRecord forKeys:[arrRecord objectAtIndex:0]];
    for (int i = 0; i < arrRecord.count; i++) {
        NSLog(@"MODMAKlMakeKey: %@", [theRecord objectForKey:@"MODMAKlMakeKey"]);
    }

}

```

Answer: 
Try this 

```
NSArray * arrRecord = [arrRecordSet objectForKey:@"Record"];

```
Try to check first if the return of [dictionary objectForKey:@"Recordset"] is really a dictionary or an array.

To do this:

```
    if([[dictionary objectForKey:@"Recordset"] isKindOfClass:[NSArray class]]) {
         //object is array
    }
    else if ([[dictionary objectForKey:@"Recordset"] isKindOfClass:[NSDictionary class]]) {
        //object is dictionary

    }

```