Interface: Resource

Properties

__name__

non-null rules.Path

The full document name, as a path.

Example

// Check 'name' field from the document
resource['__name__'] == /databases/(default)/documents/collection/document

data

non-null rules.Map

Map of the document data.

Example

// Check 'name' field from the document
resource.data.name == 'John Doe'

id

non-null rules.String

String of the document's key

Example

resource['__name__'] ==
  /databases/(default)/documents/collection/$(resource.id)

Firebase gives you the tools and infrastructure you need to build better mobile and web apps, improve app quality, and grow your business.

Updated Jun 4, 2020

Firebase gives you the tools and infrastructure you need to build better mobile and web apps, improve app quality, and grow your business.

Updated Dec 13, 2019

Firebase gives you the tools and infrastructure you need to build better mobile and web apps, improve app quality, and grow your business.

Updated Sep 7, 2022