title: Convert input fields to Json in javascript
body: <p>I would like to get a json result from my input fields.</p>
  
  <p><strong>Json Result</strong></p>
  
  <pre><code>[{ScheduledVisit: "09/06/2017 12:00 AM", Company: "ABC Corp.", ContactPerson: "Someone"}]
  </code></pre>
  
  <p>The reason for that is because I want it to fit my class of </p>
  
  <pre><code>public class ScheduleVisit
  {
      [Required(ErrorMessage = "* Required")]
      public DateTime ScheduledVisit { get; set; }
      public string Company { get; set; }
      public string ContactPerson{ get; set; } 
  }
  </code></pre>
  
  <p>I do not want to use the <code>$("inputForm").serialize();</code> because I want to learn how to do this manually.</p>
  
  <p>Below is my input form</p>
  
  <pre><code>&lt;div class="col_half"&gt;
      &lt;input type="text" name="ScheduledVisit" placeholder="Scheduled Visit" class="sm-form-control border-form-control datetimepicker" id="ScheduledVisit" /&gt;
  &lt;/div&gt;
  
  &lt;div class="col_half col_last"&gt;
      &lt;input type="text" name="company" class="sm-form-control border-form-control" placeholder="company" id="company" /&gt;
  &lt;/div&gt;
  
  &lt;div class="col_two_third"&gt;
      &lt;input type="text" name="contactPerson" placeholder="Contact Person" class="sm-form-control border-form-control" id="contact" /&gt; 
  &lt;/div&gt;
  </code></pre>
  
  <p>Please help. Thank you.</p>