title: How can I append a new property to JS object
body: <p>Here is my JS object:</p>
  
  <pre><code>  var request = {
      "name": "Name",
      "id": 3,
      "rules":[
        {
          "name": "Rule name",
          "tags": [
            {
              "tagId": 1,
              "variables":[
                {
                  "variable": "var1",
                  "matchType": "Regex"
                }
              ],
              "condition": false,
            }
          ],
          "ruleSetId": 3,
        }
      ]
    }
  </code></pre>
  
  <p>How can I add a new property <code>"value": "some value"</code> to the <code>variables</code> objects? For example, after I add this property, the object should look like this:</p>
  
  <pre><code>  var request = {
      "name": "Name",
      "id": 3,
      "rules":[
        {
          "name": "Rule name",
          "tags": [
            {
              "tagId": 1,
              "variables":[
                {
                  "variable": "var1",
                  "matchType": "Regex",
                  "value": "some value"   &lt;----------
                }
              ],
              "condition": false,
            }
          ],
          "ruleSetId": 3,
        }
      ]
    }
  </code></pre>
  
  <p>I tried the following but it adds me an additional object that only contains <code>{"value": "some value"}</code> :</p>
  
  <pre><code>  request.rules[0].tags[0].variables.push({
      "value": "some value"
    });
  </code></pre>