dot-safe_extract: Safely extract a field from a list of lists

.safe_extractR Documentation

Safely extract a field from a list of lists

Description

Internal helper function used to extract a specified field from a list of records. If a field value is NULL, it is replaced with an empty string ("").

Usage

.safe_extract(x, field)

Arguments

x

A list of lists (records), coming from parsed JSON API responses.

field

A character string naming the field to extract from each record.

Value

A character vector containing the extracted values, with NULLs replaced by "". Internal function (not designed to be used directly by end users)


valdr documentation built on April 22, 2026, 9:08 a.m.