Search code examples
firebasefirebase-realtime-databasefirebase-console

Firebase Realtime-Database Generate Unique IDs from Console


How do you generate a unique-id (or keep the key unset) in the firebase console? As far as I understand there are no real arrays in Firebase and Firebase generates unique ids when you use OnPush over an app's interface. But in the console it seems you can only add keys like '1', '2', '3', ...

I want to use firebase for my blog and want to update data only over console. but I don't want to deal with uniqueness of keys and want to keep them unset if they represent an array instead of a nested object. Is there a way to tell the console to generate the keys from a timestamp the same way it would from OnPush?


Solution

  • You cannot generate unique id in the firebase console, the most that you can make is write your own ids:

    10001
     name:userx
     email: userx@gmail.com
    10002
     name: usery
     email:usery@gmail.com
    

    a simple example.