I use Core-Data in my Iphone application. In my Core-Data I have something like that;
[object:table, number:2]
[object:table, number:4]
[object:window, number:2]
[object:window, number:5]
[object:chair, number:2]
[object:chair, number:3]
How can I get a NSArray with table’s lowest number, window’s lowest number and chair’s lowest number? Thanks.
taken STRAIGHT from the apple website
https://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/CoreData/Articles/cdFetching.html
1) specify the type of entity you want to get
2) specify the charateristics you are looking for, (you can ignore this since you want all)
3) specify the order
4) you get a sorted array so… either get the last or first entry, depending on the ordering you pick.