L
L
Lev Vorobyov2020-02-24 12:02:16
firebase
Lev Vorobyov, 2020-02-24 12:02:16

How to delete record from Firebase by specific field?

There is a database structure:
5e538fda38538883059333.png
I want to delete everything

records
, by categoryId. I want code like this:
import firebase from "firebase/app"

        async deleteCategory({dispatch, commit}, cat_id) {
                const uid = await dispatch('getUid') // получаю конкретного пользователя
                await firebase.database().ref(`users/${uid}/records`).WHERE('categoryId' === cat_id)
        }

But firebase doesn't
where()
and even nothing like that, how to be?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question