0

I am going to look up with keyword substring "vi" for key "full_name". How can I do that?

[{
    "full_Name": "David Beckham",
    "email": "davidbeckham@gmail.com"} ,
 {
    "full_Name": "Cristiano Ronaldo",
    "email": "critinanoronaldo@gmail.com"
}]

Thank you.

Jalpesh Patel
  • 3,150
  • 10
  • 44
  • 68
Han Ming
  • 1
  • 2

2 Answers2

0

You can do something like this to order and query based on a certain key

dbQuery.orderByKey().startAt(SUBSTRING).endAt(SUBSTRING+"\uf8ff");

For more info you can look at the official documentation https://firebase.google.com/docs/database/rest/retrieve-data#range-queries

Mohammed
  • 2,215
  • 1
  • 9
  • 8
0

Query firebase key with a substring is possible

let node = await db.ref('yourPath').orderByChild('full_Name').startAt('!').endAt('SUBSTRING\uf8ff').once('value');
Mili Shah
  • 1,456
  • 13
  • 21