I have an NSMutableArray 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 elements which are in array.b into an another array say arrayABC.
something like this arrayABC = [a1,a2,a3....]
HOw can i do that.. suggestions are always appreciated..
regards
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With