Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

138
Views
Firebase Realtime database multidata adding using web

I have a problem with firebase Realtime database using html/js. I'm trying to add a data like a colours of pattern but every time it overwrites the same node for example.

Patterns
     Monopattern
        colour: white

when I try to add colour black it overwrite the white to black I'm searching for a way to set a specific name to name "colour" to add it as a child of the Monopattern.

function add_colours(){
            set(ref(db,"Patterns/"+ patt_name.value),{
                Colour : patt_color.value
            })
            .then(()=>{
               alert("success");
            })
            .catch(()=>{
               alert("Unsuccessful addition, error:"+error);
            })
        }
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

If you want to create a new node under the pattern name, you can use the push function like this:

set(push(ref(db,"Patterns/"+ patt_name.value)),{
    Colour : patt_color.value
})

Every time you call push(), Firebase generates a unique key under the path you specify.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!