P
P
Peter Sergeev2021-12-19 15:49:14
JavaScript
Peter Sergeev, 2021-12-19 15:49:14

How to update existing data in firebase?

this is how the data is sent

fetch('https://myproject-c12345-default-rtdb.firebaseio.com/lists.json', {
        method: 'POST',
        headers: {
          'Content-type': 'application/json'
        },
        body: JSON.stringify({title: 'привет'})
      });


in firebase it looks like this.
61bf2951af59f812508265.png

That is, already in firebase a unique key is created by which data is written.
What needs to be specified in the request url or maybe it is somehow done differently in order to update the data using this key. That is, from the example, instead of the text "hello", set a new value, for example, "how are you"?

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