def flatten_tree: [leaf_paths as $path | {"key":$path | join("."), "value": getpath($path)}] | from_entries;
e.g. curl -s http://consul.service.consul:8500/v1/catalog/service/brilliant-service | jq -r 'flatten_tree'
I haven't felt the need to devise the reverse transformation yet, but it works great for grepping blobs of unknown structure
New graphene transistor could cut 5% from world's digital energy budget