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