Flatten and filter multi-dimension JSON with JQ
I have the following JSON test.json: [ { "status": { "+@state": "up" }, "address": { "+@addr": "10.10.10.1", "+@addrtype": "ipv4" }, "ports": { "port": [ { "+@protocol": "tcp", "+@portid": "80", "state": { "+@state": "open" } }, { "+@protocol": "tcp", "+@portid": "443",…