Note that arrays are ignored by this function, use gather_array
to gather the array first, and then use spread_all
if the array
contains objects or use one of the append_values
functions to
capture the array values if they are scalars.
Note that scalar JSON values (e.g., a JSON string like '1') are also
ignored, as they have no names to create column names with.
The order of columns is determined by the order they are encountered in the
JSON document, with nested objects placed at the end.
If an objects have name-value pairs with names that are duplicates, then
".n"
is appended for n incrementing from 2 on to ensure that columns
are unique. This also happens if .x
already has a column with the
name of a name-value pair.
This function does not change the value of the JSON attribute of the
tbl_json
object in any way.