title: how do i convert the text in the text box into json format
body: <p>here is my code.</p>
  
  <pre><code>&lt;body&gt;
  your First Name: &lt;input id="first_name" name="first_name" type="text" /&gt;
  your Last Name: &lt;input id="last_name" name="last_name" type="text" /&gt;
  &lt;input name="myBtn" type="submit" value="Submit Data" onClick="??????"&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>as you can see it is just two text boxes and a submit button.
  what i want to do is i want the user to be able to enter their name and when the click the button it converts the text into json format and displays the result underneath the button to show its work.
  can you alter my code to do this guys or point me to a link that will help me do it myself
  cheers</p>