I would like to get data from my firebase realtime database, but I only want to get the data that includes the current users UID.
See the image for the database structure:
I don't get the hang of firebase querying/sorting from the docs: https://firebase.google.com/docs/database/web/lists-of-data
// Gets all chats
return firebase.database().ref(`chat`);
// would like to do something like this
let userId = firebase.auth().currentUser.uid
firebase.database().ref('/chat/' + userId).once('value')
Would appreciate any help or tips for solving this.