Use jq to turn x=y pairs into key/value pairs
问题 I'm trying to parse environment variables from the JSON output of docker inspect . Annoyingly, those environment variables aren't returned as useful key-value pairs. They're just an array of x=y strings. Here's a relevant snippet of the output: [ { "Config": { "Env": [ "JENKINS_HOST=1.2.3.4", "JENKINS_INSTANCE=tea", "JENKINS_NAME=Enterprise Architecture Tools", "JENKINS_VERSION=2.46.2", "JENKINS_PROTOCOL=http" ] } } ] I would like to convert that array into something like this: { "Config": {