Here is an example.
class Person: Object {
dynamic var id
dynamic var name
}
// does this work?
let sortedPeople = realm.objects(Person).sorted("id")
let Dave = realm.objects(Person).filter("id=5")
// at what index does Dave reside in sortedPeople?
The reason I need to find out about this is coz I have a UITableView that is set to the sortedPeople, but I need to store the last visible row viewed. The sortedPeople array changes frequently. So, if I can find out the index in the sortedPeople of where the person is, I can create a NSIndexPath and scroll to that row.