R: Flatten a character vector of individual JSON lines into a...

flatten {ndjson} | R Documentation

## Flatten a character vector of individual JSON lines into a `data.table`

### Description

Flatten a character vector of individual JSON lines into a `data.table`

### Usage

    flatten(x, cls = c("dt", "tbl"))

### Arguments

`x` | character vector of individual JSON lines to flatten
`cls` | the package uses `data.table::rbindlist` for speed but that's not always the best return type for everyone, so you have option of keeping it a `data.table` or converting it to a `tbl`

### Value

`data.table` or `tbl`

### Examples

    flatten('{"top":{"next":{"final":1,"end":true},"another":"yes"},"more":"no"}')

[Package ndjson version 0.8.0 Index]