json_unnest {dm} | R Documentation |
Unnest a JSON column
Description
A wrapper around tidyr::unnest()
that extracts its data from a JSON column.
The inverse of json_nest()
.
Usage
json_unnest(data, cols, ..., names_sep = NULL, names_repair = "check_unique")
Arguments
data |
A data frame, a data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr). |
cols |
< When selecting multiple columns, values from the same row will be recycled to their common size. |
... |
Arguments passed to methods. |
names_sep |
If |
names_repair |
Used to check that output data frame has valid names. Must be one of the following options:
See |
Value
An object of the same type as data
Examples
tibble(a = 1, b = '[{ "c": 2 }, { "c": 3 }]') %>%
json_unnest(b)