Firebase: .priority value

前端 未结 5 1201
半阙折子戏
半阙折子戏 2021-02-20 05:44
  • 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 ep
5条回答
  •  我在风中等你
    2021-02-20 06:21

    snapshot.exportVal()

    Exports the entire contents of the DataSnapshot as a Javascript object. This is similar to val(), except priority information is included (if available), making it suitable for backing up your data.

    The export format is a Javascript object with ".priority" entries added to any object with a priority. In the case of primitive values (a string, number, or boolean) with a priority, the value is wrapped in an object with ".value" and ".priority" properties. In the case of primitive values without a priority, a primitive value is returned.

    Source: https://www.firebase.com/docs/web/api/datasnapshot/exportval.html

提交回复
热议问题