Banco de dados em tempo real Get By Field
// Firebase v9
// Don't forget to add index in Firebase->Realtime Database->Rules
// Should looks like this:
// {
// "rules": {
// "path": {
// ".indexOn": ["fieldName"]
// }
// }
// }
get(
query(
ref(database, 'path'),
orderByChild('fieldName'),
equalTo('yourValue')
)
);
Simon