my object looks like :
object = [[section: "section1", order: "1"],
[section: "section2", order: "1"],
[section: "section1", order: "2"],
[section: "section2", order: "2"]]
i want to sort it to have a result like :
[[section: "section1", order: "1"],
[section: "section1", order: "2"],
[section: "section2", order: "1"],
[section: "section2", order: "2"]]
So i need to sort by section, and in each section by order.
That's what i'm doing :
return Observable.from(realm
.objects(Section.self).sorted(byProperty: "order", ascending: true)
The string "section.." is just for the example, it can be other thing so i can't just use the character to sort. I need a real priority on X string.