Imagin the following data:
{
"name": "Abcdef",
"age": 21
},
{
"name": "Rodrigo",
"age": 24
},
{
"name": "Matt",
"age": 30
},
{
"name": "Def",
"age": 21
}
How do I make the equivlant to this search:
SELECT * FROM table WHERE name = "%def"
so that I get this result:
{
"name": "Abcdef",
"age": 21
},
{
"name": "Def",
"age": 21
},
(or at least the first result because its %def)
I've tried startAt
and endAt
and also use "\uf8ff"
but nothing seems to work....
This SHOULD be the solution:
ref.orderByChild("name").endAt("def"+"\uf8ff").once('value'....
meaning: it ends with 'def' but this doesn't work....
(I'm using the Javascript SDK)
(Note: my problem is not the capital D, its the string match)