Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- orders:
- user001: // this is user 1
- 11168128:
- name: "order 1"
- status: "pending"
- 11168129:
- name: "order 2"
- status: "canceled"
- user002: // this is user 2
- 11168130:
- name: "order 3"
- status: "pending"
- user003: // this is user 3
- 11168131:
- name: "order 4"
- status: "pending"
- 11168132:
- name: "order 5"
- status: "canceled"
- this.orders = this.db.list(`orders`)
- .snapshotChanges().map(changes => {
- return changes.map(c => ({ key: c.payload.key, ...c.payload.val() }));
- });
Add Comment
Please, Sign In to add comment