ObjectValue

ObjectValue

An ObjectValue represents a MapValue in the Firestore Proto and offers the ability to add and remove fields.

Constructor

new ObjectValue()

Methods

applyChanges()

Modifies fieldsMap by adding, replacing or deleting the specified entries.

getFieldsMap()

Returns the map that contains the leaf element of path. If the parent entry does not yet exist, or if it is not a map, a new map will be created.

set(path, value)

Sets the field to the provided value.

Parameters:
Name Type Description
path

The field path to set.

value

The value to set.

setAll(data)

Sets the provided fields to the provided values.

Parameters:
Name Type Description
data

A map of fields to values (or null for deletes).