How to Do Type casting in Couchbaselite SDK

Hi Support,

I am having a field named “Number” as string in my documents. While querying using iOS SDK I have to user orderBy property. Since number is saved as string So orderBy(Ordering.property(“number”).descending()) is treating it as string. Is there any way to typecast any property to Int in query?

Thanks

Save the field as a number, not a string.