salesforcer (version 0.2.2)

collapse_list_with_dupe_names: Collapse Elements in List with Same Name

Description

This function looks for instances of elements in a list that have the same name and then combine them all into a single comma separated character string (referenceTo) or tbl_df (picklistValues).

Usage

collapse_list_with_dupe_names(x)

Arguments

x

list; a list, typically returned from the API that we would parse through

Value

A list containing one row per field for the requested object.

Examples

Run this code
# NOT RUN {
obj_dat <- sf_describe_objects(object_names = "Contact", api_type = "SOAP")[[1]]
obj_fields_list <- obj_dat[names(obj_dat) == "fields"] %>% 
  map(collapse_list_with_dupe_names)
# }

Run the code above in your browser using DataLab