voluptasmollitia
Version:
Monorepo for the Firebase JavaScript SDK
27 lines (15 loc) • 687 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@firebase/database](./database.md) > [DataSnapshot](./database.datasnapshot.md) > [hasChild](./database.datasnapshot.haschild.md)
## DataSnapshot.hasChild() method
Returns true if the specified child path has (non-null) data.
<b>Signature:</b>
```typescript
hasChild(path: string): boolean;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| path | string | A relative path to the location of a potential child. |
<b>Returns:</b>
boolean
`true` if data exists at the specified child path; else `false`<!-- -->.