Get users by name property using Firebase
Asked 07 September, 2021
Viewed 389 times
  • 62
Votes

I'm trying to create an application where I can get/set data in specific users accounts and I was tempted by Firebase.

The problem I'm having is that I don't know how to target specific users data when my structure looks like this:

My data structure described by the text below.

online-b-cards
  - users
    - InnROTBVv6FznK81k3m
       - email: "hello@hello"
       - main:  "Hello world this is a text"
       - name:  "Alex"
       - phone: 12912912

I've looked around and I can't really find anything on how to access individual data let alone when they're given some random hash as their ID.

How would I go about grabbing individual user information based of their name? If there is a better way of doing this please tell me!

8 Answer