views:

32

answers:

1

this is the print screen of nsmutablearray.

this 2409,2410,2412 is not fix key. it coming dynamically.

{

2409 =     (
            {
        AltSelectionPrice = "2.00";

    },
            {
        AltSelectionPrice = "3.00";
    }
);
2410 =     (
            {
        AltSelectionPrice = "7.00";
    },
            {
        AltSelectionPrice = "0.00";
    }
);
2412 =     (
            {
        AltSelectionPrice = "0.00";
    },
            {
        AltSelectionPrice = "9.00";
    },
            {
        AltSelectionPrice = "5.00";

    }
);

}

thnx in advance.

+1  A: 

I am currently on my work computer which runs Windows so cannot post exact code. But what you need to do is get hold of dictionary in the array. May be like following:

NSDictionary* dict = [myMutableArray objectAtIndex:0];

and then iterate over keys in the dictionary:

for (id key in [dict keyEnumerator]) {
    //use the key or get the object of that key using [dict objectForKey:key]
}

Update: I assumed you are getting this array from a JSON parser!

Hemant
Thnx a lot buddy... its really usseful.......
RakeshBhatt