title: Add new array element to an existing JSON array using jq for sendgrid API
body: <p>This question is related to a <a href="https://stackoverflow.com/questions/25414854/add-json-array-element-with-jq-cmdline">previous</a> one. </p>
  
  <p>In my case, I would like to simply add individual elements. I have the following input.json. </p>
  
  <pre><code>{
    "content": [
    ],
    "from": {
      "email": "someemail@gmail.com",
      "name": "Some Name"
    },
    "reply_to": {
      "email": "someemail@gmail.com",
      "name": "Some Name"
      },
    "personalizations": [{
      "to": [{
          "email": "someemail@gmail.com"
        },
        {
          "email": "someotheremail@gmail.com"
        }]
      }]
  }
  </code></pre>
  
  <p>I would like to append the subject and template_id so that the output.json looks like below. </p>
  
  <pre><code>{
    "content": [
    ],
    "from": {
      "email": "someemail@gmail.com",
      "name": "Some Name"
    },
    "reply_to": {
      "email": "someemail@gmail.com",
      "name": "Some Name"
      },
    "personalizations": [{
      "to": [{
          "email": "someemail@gmail.com"
        },
        {
          "email": "someotheremail@gmail.com"
        }],
      "subject": "Some subject"
      }],
      "template_id": "someID"
  }
  </code></pre>
  
  <p>How would I do that with jq (including the syntax for input.json and output.json) in bash? </p>