Accéder à la console

Index

Properties

key

key: string | null

The last part of the Reference's path.

For example, "ada" is the key for https://<DATABASE_NAME>.firebaseio.com/users/ada.

The key of a root Reference is null.

example
// The key of a root reference is null
var rootRef = firebase.database().ref();
var key = rootRef.key;  // key === null
example
// The key of any non-root reference is the last token in the path
var adaRef = firebase.database().ref("users/ada");