title: Formulate JSON in JavaScript from HTML form textarea values and Post?
body: <p>I want to have an HTML form that posts the following in an Http-request body.</p>
  
  <pre><code>{ “info” : {
       “id” : “123”
       “text1” : &lt;comes from html text-box&gt;
  }
  </code></pre>
  
  <p>So, what I want is to formulate the above as a JavaScript Object, and then post this JavaScript object on submit. The value of “text1” will be coming from user input, that will be an html-form textarea input box. The first value “id” will be hard-coded, or could also come from a hidden text-box.</p>
  
  <p>So my question is: how can I write a piece of JavaScript to achieve this, together with the corresponding html form, etc.</p>