I\'m trying to save a JSON object where each line is a record. How can I save the JSON object so that the number of lines is equal to the number of records (5 in example below)
use jsonlite::stream_out
jsonlite::stream_out
df <- mtcars[1:5,] jsonlite::stream_out(df, file('tmp.json'))
that gives newline delimited JSON or "ndjson"