I am hoping to do a filter query with something along the lines of LIKE, but not sure how to include the question marks or wildcards.
I have a text field where the user is typing in their phone number.
I have a phone string property in the object I’m querying. I want to find the user by their phone number, but if there we ( ) or - or . included in the string then it doesn’t match.
For instance, if I have this object and state variable:
Person(name: “Greg”, phone: “415-867-5309”)
this.setState({ phone: “4158675309” })
then I want this query to include this object:
realm.objects(‘Person’).filtered(‘phone CONTAINS $0’, this.state.phone)
Is this possible?