title: using faker to create a json file
body: <p>I am trying to create a faker js file that will create a json file with 25 random user data.</p>
  
  <p>First I start with an empty army, then open a for loop and place the faker inside, then push the data and print it to a json file but it doesn't seem to work.</p>
  
  <p>Here is my code</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var faker = require('faker');
  var fs = require('fs');
  
  var ourfaker = [];
  
  for (i=0; i&lt;=25; i++)
  
  var data = {};
  {
  data.name = faker.fake("{{name.findName}}");
  data.email = faker.fake("{{internet.email}}");
  
  ourfaker.push(data);
  };
  
  fs.writeFile('data.json', JSON.stringify(data), (err) =&gt; {
    if (err) throw err;
    console.log('It\'s saved!');
  });</code></pre>
  </div>
  </div>
  </p>