title: regular expression add double quotes around values and keys in javascript
body: <p>i need a valid JSON format to request ES.
  i have a string like </p>
  
  <pre><code>{ 
  time:  { 
            from:now-60d,
            mode:quick,
            to:now } 
  }
  </code></pre>
  
  <p>but when i try to use <code>JSON.parse</code> i got error because my string should be like</p>
  
  <pre><code> { 
  time:  { 
            "from":"now-60d",
            "mode":"quick",
            "to":"now" } 
  }
  </code></pre>
  
  <p>so my question, there is any solution to add double quotes around keys and values of my string ?</p>
  
  <p>thanx</p>