title: Select multiple fields using jq
body: <p>I am trying to filter docker-machine's output using the following jq filter.</p>
  
  <pre><code>docker-machine inspect default | jq '{ConfigVersion, .Driver.{MachineName, CPU, Memory}, DriverName}'
  </code></pre>
  
  <p>The original json for the first command is here</p>
  
  <pre><code>{
      "ConfigVersion": 3,
      "Driver": {
          "IPAddress": "192.168.99.100",
          "MachineName": "default",
          "SSHUser": "docker",
          "SSHPort": 52314,
          "SSHKeyPath": "/Users/apatil/.docker/machine/machines/default/id_rsa",
          "StorePath": "/Users/apatil/.docker/machine",
          "SwarmMaster": false,
          "SwarmHost": "tcp://0.0.0.0:3376",
          "SwarmDiscovery": "",
          "VBoxManager": {},
          "HostInterfaces": {},
          "CPU": 2,
          "Memory": 5120,
          "DiskSize": 20000,
          "NatNicType": "82540EM",
          "Boot2DockerURL": "",
          "Boot2DockerImportVM": "",
          "HostDNSResolver": false,
          "HostOnlyCIDR": "192.168.99.1/24",
          "HostOnlyNicType": "82540EM",
          "HostOnlyPromiscMode": "deny",
          "UIType": "headless",
          "HostOnlyNoDHCP": false,
          "NoShare": false,
          "DNSProxy": true,
          "NoVTXCheck": false,
          "ShareFolder": ""
      },
      "DriverName": "virtualbox",
      "HostOptions": {
          "Driver": "",
          "Memory": 0,
          "Disk": 0,
          "EngineOptions": {
              "ArbitraryFlags": [],
              "Dns": null,
              "GraphDir": "",
              "Env": [],
              "Ipv6": false,
              "InsecureRegistry": [],
              "Labels": [],
              "LogLevel": "",
              "StorageDriver": "",
              "SelinuxEnabled": false,
              "TlsVerify": true,
              "RegistryMirror": [],
              "InstallURL": "https://get.docker.com"
          },
          "SwarmOptions": {
              "IsSwarm": false,
              "Address": "",
              "Discovery": "",
              "Agent": false,
              "Master": false,
              "Host": "tcp://0.0.0.0:3376",
              "Image": "swarm:latest",
              "Strategy": "spread",
              "Heartbeat": 0,
              "Overcommit": 0,
              "ArbitraryFlags": [],
              "ArbitraryJoinFlags": [],
              "Env": null,
              "IsExperimental": false
          },
          "AuthOptions": {
              "CertDir": "/Users/apatil/.docker/machine/certs",
              "CaCertPath": "/Users/apatil/.docker/machine/certs/ca.pem",
              "CaPrivateKeyPath": "/Users/apatil/.docker/machine/certs/ca-key.pem",
              "CaCertRemotePath": "",
              "ServerCertPath": "/Users/apatil/.docker/machine/machines/default/server.pem",
              "ServerKeyPath": "/Users/apatil/.docker/machine/machines/default/server-key.pem",
              "ClientKeyPath": "/Users/apatil/.docker/machine/certs/key.pem",
              "ServerCertRemotePath": "",
              "ServerKeyRemotePath": "",
              "ClientCertPath": "/Users/apatil/.docker/machine/certs/cert.pem",
              "ServerCertSANs": [],
              "StorePath": "/Users/apatil/.docker/machine/machines/default"
          }
      },
      "Name": "default"
  }
  </code></pre>
  
  <p>I am getting the following error from jq for the command above</p>
  
  <pre><code>$ docker-machine inspect default | jq '{ConfigVersion, .Driver.{MachineName, CPU, Memory}, DriverName}'
  jq: error: syntax error, unexpected FIELD (Unix shell quoting issues?) at &lt;top-level&gt;, line 1:
  {ConfigVersion, .Driver.{MachineName, CPU, Memory}, DriverName}
  jq: error: syntax error, unexpected '}', expecting $end (Unix shell quoting issues?) at &lt;top-level&gt;, line 1:
  {ConfigVersion, .Driver.{MachineName, CPU, Memory}, DriverName}
  jq: 2 compile errors
  </code></pre>