tags:

views:

40

answers:

2

hi all, i hv an NSmutable array something like this array =[[a1,b1,c1],[a2,b2,c2],[a3,b3,c3].......] and i access this array for particular object like

array.A =[a1,a2,a3] array.b=[b1,b2,b3] ......

what i am trying to do is to copy all ements which are at array.b into a another array say arrayABC.

something like this NewABC = [a1,a2,a3....]

HOw can i do that.. suggestions are always appreciated..

regards

+1  A: 

Hi shishir.bobby,

You could use the "arrayWithArray" class method in NSArray:

NSArray *newABC = [NSArray arrayWithArray:someOtherArray];

See http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/NSArray.html%23//apple_ref/doc/uid/20000137-BABCADBE

Joubert Nel
Thanks mate...i finally got it running. thanks for replying man..i am upvoting u for the link
shishir.bobby
A: 

i think i got my answer by myself

[newArray addObject:array.A];

it works for me....

shishir.bobby