Utility function to convert a vector into the array format expected by the some REDCap API calls. It is called internally by REDCapR functions, and is not intended to be called directly.
A vector to convert to array format. Can be
A string containing the name of the API request parameter for the array. Must be either "fields" or "forms".
x is not
NULL a list is returned with one element for
each element of x in the format:
list(`element_names` = x, `element_names` = x, ...).
NULL is returned.