The unsparsify verb of mlr ensures that all output records have all fields and adds empyempty values to non-existing fields (like in the broadcast field in the serondsecond record above).
The unsparsify verb of mlr ensures that all output records all fields and adds empy values to non-existing fields (like in the broadcast field in the serond record above).
The unsparsify verb of mlr ensures that all output records have all fields and adds empty values to non-existing fields (like in the broadcast field in the second record above).
$ ip -j addr show enp1s0 | jq 'first.addr_info' | mlr --j2p --barred unsparsify +--------+-------------------------+-----------+---------------+--------+---------+--------+-----------------+---------------------+ | family | local | prefixlen | broadcast | scope | dynamic | label | valid_life_time | preferred_life_time | +--------+-------------------------+-----------+---------------+--------+---------+--------+-----------------+---------------------+ | inet | 192.168.1.191 | 24 | 192.168.1.255 | global | true | enp1s0 | 68465 | 68465 | | inet6 | fe80::2a0:aff:fe08:9aa6 | 64 | | link | | | 4294967295 | 4294967295 | +--------+-------------------------+-----------+---------------+--------+---------+--------+-----------------+---------------------+ $ ip -j addr show enp1s0 | jq 'first.addr_info' | mlr --j2p barred unsparsify +--------+-------------------------+-----------+---------------+--------+---------+--------+-----------------+---------------------+ | family | local | prefixlen | broadcast | scope | dynamic | label | valid_life_time | preferred_life_time | +--------+-------------------------+-----------+---------------+--------+---------+--------+-----------------+---------------------+ | inet | 192.168.1.191 | 24 | 192.168.1.255 | global | true | enp1s0 | 68465 | 68465 | | inet6 | fe80::2a0:aff:fe08:9aa6 | 64 | | link | | | 4294967295 | 4294967295 | +--------+-------------------------+-----------+---------------+--------+---------+--------+-----------------+---------------------+ $ ip -j addr show enp1s0 | jq 'first.addr_info' | mlr --j2p --barred unsparsify +--------+-------------------------+-----------+---------------+--------+---------+--------+-----------------+---------------------+ | family | local | prefixlen | broadcast | scope | dynamic | label | valid_life_time | preferred_life_time | +--------+-------------------------+-----------+---------------+--------+---------+--------+-----------------+---------------------+ | inet | 192.168.1.191 | 24 | 192.168.1.255 | global | true | enp1s0 | 68465 | 68465 | | inet6 | fe80::2a0:aff:fe08:9aa6 | 64 | | link | | | 4294967295 | 4294967295 | +--------+-------------------------+-----------+---------------+--------+---------+--------+-----------------+---------------------+ Given your data from the question (fed straight into the mlr command above, as the addr_info array has already been extracted), this would produce
Given your data from the question, this would produce
Given your data from the question (fed straight into the mlr command above, as the addr_info array has already been extracted), this would produce
Loading