for example, if I have an object:
@interface MyObject
{
__id;
__data;
}
and I have an NSArray of such object:
id=4
data=Apple
id=5
data=Banana
id=6
data=Orange
I also have an NSArray of ids:
{"5", "4", "6"}
now I want to sort the array of objects by ids to be in the order in the second array, so the result should be:
id=5
data=Banana
id=4
data=Apple
id=6
data=Orange
Is it possible(in ObjC for iPhone)? What is the most efficient way?
Thanks!