Open hleegwater opened 1 week ago
The function now only copies name and content. I think I need at least id as well (see below), but maybe I can find a way to just pivot all columns.
data_frame_to_fields <- function (fields_data_frame) { fields <- lapply(1:nrow(fields_data_frame), function(row_nr) { list(id = fields_data_frame$id[row_nr], name = fields_data_frame$name[row_nr], content = fields_data_frame$content[row_nr] ) }) names(fields) <- fields_data_frame$name return(fields) }
The function now only copies name and content. I think I need at least id as well (see below), but maybe I can find a way to just pivot all columns.