voluptasmollitia
Version:
Monorepo for the Firebase JavaScript SDK
22 lines (12 loc) • 723 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@firebase/database](./database.md) > [DataSnapshot](./database.datasnapshot.md) > [exportVal](./database.datasnapshot.exportval.md)
## DataSnapshot.exportVal() method
Exports the entire contents of the DataSnapshot as a JavaScript object.
The `exportVal()` method is similar to `val()`<!-- -->, except priority information is included (if available), making it suitable for backing up your data.
<b>Signature:</b>
```typescript
exportVal(): any;
```
<b>Returns:</b>
any
The DataSnapshot's contents as a JavaScript value (Object, Array, string, number, boolean, or `null`<!-- -->).