Firebase: .priority value

firebase

Solution

You can see `.priority` in a json by "Export JSON" from the Forge.

Problem

- How do I check the .priority values are in my "Forge"? - According to docs, smaller .priority value comes before larger .priority value. If I use seconds since epoch for priority, and I want the latest children to show up on top, should I set .priority to be 1/seconds? Children with a number as their priority come next. They are sorted numerically by priority (small to large) and then lexicographically by name (a to z). - From experimentation, I've determined that if I set .priority to java.util.Date#getTime, oldest children show up on top in my Forge, but latest children show up on top in my Javascript on() when ranking using prevChildName. Why is this?

Original source