combine_jsons: Combine JSON files

View source: R/bids_tools.R

combine_jsonsR Documentation

Combine JSON files

Description

Combine JSON files

Usage

combine_jsons(json_filenames, out_filename, outpath = getwd())

Arguments

json_filenames

Vector of the json files to be combined. Preferably without file extensions. Preferably containing the full path.

out_filename

Filename of the output json file. Preferably without file extensions.

outpath

Path to the output files. Defaults to the working directory.

inpath

Path to the input files. Defaults to the working directory.

Value

Creates a combined .json file.

Examples

k <- list(abc = 1, def = 2)
j <- list(abcd = 3, defg = 4)
jsonlite::write_json(k, 'json1.json')
jsonlite::write_json(j, 'json2.json')

combine_jsons(c('json1', 'json2'), 'combined')

mathesong/kipettools documentation built on Feb. 5, 2024, 10:10 p.m.