title: How to push elements in JSON from javascript array
body: <p>I want to add javascript array values into JSON values object. The other element is also replaced my element like recipients, subject, message. I got Json like:</p>
  
  <p><img src="https://i.stack.imgur.com/bGRQV.png" alt="enter image description here"> </p>
  
  <p><strong>Below is my code.</strong></p>
  
  <pre><code>var BODY = {
      "recipients": {
        "values": [
       ]
      },
     "subject": title,
     "body": message
  }
  
  var values = [];
  for (var ln = 0; ln &lt; names.length; ln++) {
  var item1 = {
      "person": {
              "_path": "/people/"+names[ln],
              },
  };
  values.push(item1);
  }
  BODY = JSON.stringify({values: values});
  alert(BODY);
  </code></pre>