I am trying to query data on firebase to find a child with a value containing a portion of a string. So say the value is 'apple' if I search 'app' I would have that record returned. I realize this has been asked but the answers I have read all point to the fact that firebase will be integrating this feature....its almost 3 years later and I can't seem to find anything.
In your example...
If you are strictly querying for data that starts with a string, 'app' in this case, then that's easily done with:
queryStartingAtValue("app").queryEndingAtValue("app\u{f8ff}")
For more info, see the very well written but now legacy Firebase Guide To Retrieving Data
and scroll down to the Range Queries section
For completeness:
The f8ff character used in the query above is a very high code point in the Unicode range. Because it is after most regular characters in Unicode, the query matches all values that start with a b. (app in this case)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With