title: from json object to my object properties
body: <p>This is a little hard to explain. I got this from server:</p>
  
  <pre><code>{"enable": "15,16,17,18,19,20,21,22,23",
  "disable": "{ from: new Date(2014,9,16,23,0), to: new Date(2014,9,16,23,0) }"}
  </code></pre>
  
  <p>and this is how I try to set the enabled and disables hours to my pickatime object from that JSON object. (<a href="http://amsul.ca/pickadate.js/api.htm#method-set-disable-enable" rel="nofollow">http://amsul.ca/pickadate.js/api.htm#method-set-disable-enable</a>)</p>
  
  <pre><code>        $.get('/ajax/res/', function(data) {
              var picker = $("#rz-time-1").pickatime('picker');
  
              picker.set('enable', [
                  data.enable
              ]);
              picker.set('disable', [
                  data.disable
              ]);
          }, 'json');
  </code></pre>
  
  <p>this doesn't work, however if I put $.parseJSON(data.enable) it works only if there is not commas in my string... otherwise I get <strong>unexpected non-whitespace character</strong> because of the commas...</p>