title: how to check whether you need to parse or not need to parse?
body: <p>I have a JSON:</p>
  
  <pre><code>var datat= {"Model": "Model A",
                  "Datase": [
                      {
                          "Id": "DatchikSveta11",
                          "Group": 2,
                          "State": "on",
                          "Data": [{
                              "Date":"2017-08-11 15:10:34.363",
                              "Value":"0" 
                          },{
                              "Date":"2017-08-12 21:12:34.363",
                              "Value":"32"
                          },{
                              "Date":"2017-08-15 21:55:34.363",
                              "Value":"200"
                              }],
                          "DataVolume": "luxs"    
                      },{
                          "Id": "DatchikSveta2",
                          "Group": 2,
                          "State": "on",
                          "Data": [{
                              "Date":"2017-08-11 17:11:34.363",
                              "Value":"100"
                          },{
                              "Date":"2017-08-15 18:11:34.363",
                              "Value":"100"
                          },{
                              "Date":"2017-08-16 19:12:34.363",
                              "Value":"200"
                          }],
                          "DataVolume": "luxs"
                      }
                  ]}
  </code></pre>
  
  <p>I have a function that parse JSON object.</p>
  
  <pre><code>parseDate = d3.timeParse("%Y-%m-%d %H:%M:%S.%L");
  datat.Datase.forEach(function (kv) {
          kv.Data.forEach(function (d) {
              parseDate(d.Date);
              parseInt(d.Value);
          });
      });
  </code></pre>
  
  <p>This function change values in original JSON object (date to parse date), so when im trying to call this function second time it gives a bad values, because it trying to parse already parsed dates. </p>
  
  <p><strong>I need to specify a condition that would allow to check whether you need to parse or not need to parse.</strong>
  Or maybe someone have a function with the help of which it is possible to extract the parsed value without changing it in an original JSON? I understand that the easiest way is to return new variable from function like:</p>
  
  <pre><code> .data(function (d){
          var a = d.Data.slice(d.Data.length-1,d.Data.length);
          a.forEach(function (k){k["Id"]=d.Id;  k["Date"]=parseDate(d.Date);});
          return a;
      })  
  </code></pre>
  
  <p>I can change date format in JSON, but who needs simple way? </p>
  
  <p>Im a new in javascript and have no time for the theory :P 
  But i hope that someone can give me a good answer.</p>
  
  <p>Sorry for my english and sorry for the theory, and thank you for attention :)   </p>