Cannot add node to Firebase through console

后端 未结 1 772
攒了一身酷
攒了一身酷 2020-12-03 21:00

I have a Firebase project with 2 mobile apps:

  1. FriendlyChat example from Firebase/Google (messages) - created first
  2. Grocery Items list (grocery-items)
相关标签:
1条回答
  • 2020-12-03 21:27

    The Firebase Database is a key-value store. It stores the values of keys at paths in the tree. But it only stores keys when they have an actual value. If there is no value for a key/path, it is immediately deleted.

    So if you click the + button, then enter a key and click the Add button, it will delete the first key that you entered because it doesn't have a value.

    What you instead should do depends on what you want to accomplish.

    To add a single key/value pair:

    • click the +
    • enter a key/Name
    • enter a Value
    • click Add

    If you want to add a JSON snippet/tree:

    • click the +
    • enter a key/Name
    • click the + next to the (empty) Value
    • enter a key/Name for the child
    • enter a Value for the child
    • click Add
    0 讨论(0)
提交回复
热议问题