am_values: Get all values from a map or list

View source: R/objects.R

am_valuesR Documentation

Get all values from a map or list

Description

Returns all values from an Automerge map or list as an R list.

Usage

am_values(doc, obj)

Arguments

doc

An Automerge document

obj

An Automerge object ID, or AM_ROOT for the document root

Value

R list of values

Examples

doc <- am_create()
am_put(doc, AM_ROOT, "a", 1)
am_put(doc, AM_ROOT, "b", 2)
am_put(doc, AM_ROOT, "c", 3)

values <- am_values(doc, AM_ROOT)
values  # list(1, 2, 3)

am_close(doc)


automerge documentation built on Feb. 5, 2026, 5:08 p.m.