title: how to convert JSON response to .json file
body: <p>I want to generate a .json file on my local project folder. I want to save the fetch API call response (which is an array of objects) into a .json file Here is my code :
  ts :</p>
  
  <pre><code> getRecords(){
  
     this.service.getRecords()
      .subscibe((res)=&gt;{
        // res.data -want to convert this data into .json file
        });
  
   }
  </code></pre>