← Back to index

Firebase.child() - Firebase

Created: 2015-08-28 13:45  |  Source: https://www.firebase.com/docs/web/api/firebase/child.html

Firebase.child()

child()

child(childPath)

Gets a Firebase reference for the location at the specified relative path.

Arguments

childPathString
A relative path from this location to the desired child location.

Return Value

Firebase
The Firebase reference for the specified child location.

Get a Firebase reference for the database location at the specified relative path. The relative path can either be a simple child name (e.g. "fred") or a deeper slash-separated path (e.g. "fred/name/first").

  1. usersRef Firebase'https://samplechat.firebaseio-demo.com/users'
  2. fredRef usersRefchild'fred'
  3. fredFirstNameRef fredRefchild'name/first'
  4. fredFirstNameReftoString
  5. // path is now 'https://samplechat.firebaseio-demo.com/users/fred/name/first'