Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simulate Firebase push() in Graphical UI (Forge)

Tags:

firebase

I'm able to enter multi-level data in my app and in the Graphical UI, i.e. Forge, (Related Question), but I want to simulate the push() functionality to generate a unique child name.

I tried leaving the parent name blank, and creating list items under it (filling in all names and values), but nothing gets saved.

Is there something else to enter in the parent name, so a unique value is created?

like image 595
JeffO Avatar asked Mar 21 '23 08:03

JeffO


1 Answers

There is no push() command in Forge. There's really no need for it as it's slow to enter the data key-by-key and you'd manage it faster by just opening the JavaScript console and punching it in.

Since Forge is already authenticated as an admin, you can open your debugger from there, and type something like this:

new Firebase(URL+'/path/to/data').push({ ... values ... });

Alternately, if you're determined to enter them in the UI, you can obtain a push id by the same means:

new Firebase(URL+'/path/to/data').push().name();

Then copy/paste that into the browser.

like image 95
Kato Avatar answered Mar 23 '23 21:03

Kato