(anObject = [enumerator nextObject] returns reverse order of array objects

270 Views Asked by At

I get a json response from my web-service,I log it and get in a proper order, but when I start parsing the data in array using NSEnumerator and apply id anObject;

while ((anObject = [enumerator nextObject]))

and log anObject,I get the array in exactly reverse order,does any one have idea about this or is their any workaround to use enumerator to get objects in correct order for parsing? I have posted after having searched in this forum but their isnt any for ios for this topic.

thankx in advance.

1

There are 1 best solutions below

0
shawkaine On

How about NSEnumerator *enumerator = [arr reverseObjectEnumerator]; ?