Place all items inside a folder in the firebase database

Asked

Viewed 24 times

0

I’m trying to take all the items in the database and put them in a folder. When I went to the database I forgot to put the directory for the items to go to a folder inserir a descrição da imagem aqui

1 answer

0

After many attempts and mistakes I found a "way", maybe there is a more practical and easy way, anyway, what I had to do was the following:

1 - Are you logged in to your Database? Then, when you enter it, you will see that you have the three dots, next to a '+' and '-'. Hit it and export JSON. inserir a descrição da imagem aqui

2 - Blz, now that you have exported do the following:

Open Vscode or any text editor of your choice.

The raw JSON file is basically a hierarchy of data, to put the data inside a folder where it did not exist we will create a:

In my case, I wanted to put all the data inside a folder called 'products', so right at the beginning put the word 'products: {}', inside these keys is where you will put the items in your database.

(Tendi was is nothing). Ok, I’ll leave an image to facilitate :)

inserir a descrição da imagem aqui

inserir a descrição da imagem aqui

To finish save your file and import there in the database in the same 3 dots :))))

Browser other questions tagged

You are not signed in. Login or sign up in order to post.