Skip to main content
Version: v1.7.0

nest_dotted

Function

nest_dotted transform fields in a record with dotted names to nested records.

Synopsis

nest_dotted(val: record) -> record

Description

The nest_dotted function returns a copy of val with all dotted field names converted into nested records. If no argument is supplied to nest_dotted, nest_dotted operates on this.

Examples

echo '{"a.b.c":"foo"}' | zq -z 'yield nest_dotted()' -

=>

{a:{b:{c:"foo"}}}