Home > @firebase/database > DataSnapshot > hasChild
DataSnapshot.hasChild() method
Returns true if the specified child path has (non-null) data.
Signature:
hasChild(path: string): boolean;
Parameters
Parameter | Type | Description |
---|---|---|
path | string | A relative path to the location of a potential child. |
Returns:
boolean
true
if data exists at the specified child path; else false
.