title: How to remove single quote and put double quotes in the array of objects in javascript
body: <p>I want to remove single quotes and put double quotes in the array of objects in javascript. </p>
  
  <pre><code>var arr=[{ email: 'abc@gmail.com', name: 'Abc' },
           { email: 'def@hotmail.com', name: 'Dr.Def' },
           { email: 'xyz@gmail.com', name: 'Xyz' },
           { email: 'cad@hotmail.com', name: 'Cad' }];
  </code></pre>
  
  <p><strong>I want output be like:</strong></p>
  
  <pre><code>var arr=[{"email":"abc@gmail.com","name":"Abc"},
           {"email":"def@hotmail.com","name":"Dr.Def"},
           {"email":"xyz@gmail.com","name":"Xyz"},
           {"email":"cad@hotmail.com","name":"Cad"}];
  </code></pre>