title: Passing JSON objects to jq arguments
body: <p>Data sample - <strong>sample.json</strong> (full sample: <a href="https://pastebin.com/KFkVmc2M" rel="nofollow noreferrer">https://pastebin.com/KFkVmc2M</a>)</p>
  
  <pre><code>    {
        "ip": 3301234701,
        "_shodan": {
          "options": {
            "referrer": "7ae15507-f5cc-4353-b72e-5cc0b1c34c5e"
          },
        },
        "hash": -1056085507,
        "os": null,
        "title": "WHM Login",
        "opts": {
          "vulns": ["!CVE-2014-0160"],
          "heartbleed": "2017/08/29 09:57:30 196.196.216.13:2087 - SAFE\
          }
        },
        "isp": "Fiber Grid Inc",
        "http": {
          "redirects": [],
          "title": "WHM Login",
          "robots": null,
          "favicon": null,
          "host": "196.196.216.13",
          "html":
  }
  </code></pre>
  
  <p>Script using jq which I hoped would work and haven't found a another solution yet.</p>
  
  <pre><code>   cat sample.json | jq \
     --arg key0   'Host' \
     --arg value0 '.host' \
     --arg key1   'Vulnerability' \
     --arg value1 '.opts.vulns[0]' \
     --arg key2   'ISP' \
     --arg value2 '.isp' \
     '. | .[$key0]= $value0 | .[$key1]=$value1 | .[$key2]=$value2' \
     &lt;&lt;&lt;'{}'
  </code></pre>
  
  <p>The end result I hoped, but not getting:</p>
  
  <pre><code>{
    "Host": "196.196.216.13",
    "Vulnerability": "!CVE-2014-0160",
    "ISP": "Fiber Grid Inc"
  }
  </code></pre>
  
  <p>Right now it just returns the object as a string and I've tried a lot of different ways to approach the problem. I am quite new to working with JSON and jq but based on what I've read so far, the solution might not be as simple as I'm wishing?</p>
  
  <p>Simply put, why isn't the object being returned as a value of the sample.json object and what do I have to do, to make it work? </p>
  
  <p>Thanks!</p>
  
  <p>to: chepner</p>
  
  <pre><code>{
    "196.196.216.13":[
    "AS63119",
    "Fiber Grid Inc",
    "2017-08-29T06:57:22.546423",
    "!CVE-2014-0160"
  ],
  "196.196.216.14":[
    "AS63119",
    "Fiber Grid Inc",
    "2017-08-29T06:57:22.546423",
    "!CVE-2014-0160"
  ]
  }
  </code></pre>