I am using firebase for data storage. The data structure is like this:
products:{ product1:{ name:\"chocolate\", } product2:{ name:\"cho
I believe you can do :
admin .database() .ref('/vals') .orderByChild('name') .startAt('cho') .endAt("cho\uf8ff") .once('value') .then(c => res.send(c.val()));
this will find vals whose name are starting with cho.
source