lines <- c('{ "a": 1, "b": true }',
'{ "b": false, "nested": { "c": 100, "d": false }}',
'{ "a": 3.14, "nested": { "d": true }}')
file <- tempfile()
writeLines(lines, file)
(data <- read_ndjson(file))
data$a
data$b
data$nested.c
data$nested.d
rm("data")
gc() # force the garbage collector to release the memory-map
file.remove(file)
Run the code above in your browser using DataLab