title: Angular save the content of a form to a json file
body: <p>I am using Angular 6 and I would like to save the content of a form into a json file.
       Is there a way this can be done?</p>
  
  <pre><code> &lt;div class="container"&gt;
      &lt;div class="row"&gt;
         &lt;div class="col-md-12"&gt;
            &lt;form input type="text" id="firstName"
             ...
             input type = "text id="lastName" /&gt;
         &lt;/div&gt;
      &lt;/div&gt;
   &lt;/div&gt;
  
  output.json
  {
     "firstName": "John",
     ...
     "lastName": "Doe"
  }
  </code></pre>