The Firebase JS SDK is now in BETA!
This EAP site is no longer maintained. See the official Firebase Documentation site for the latest documentation and information about the Firebase JS SDK.

Home > @firebase/database > DataSnapshot > exportVal

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.

Signature:

exportVal(): any;

Returns:

any

The DataSnapshot's contents as a JavaScript value (Object, Array, string, number, boolean, or null).