title: Turning for loop into lodash _.forEach
body: <p>I am trying to turn this</p>
  
  <pre><code>        _.forEach(dataset, function(items) {
            _.forEach(items, function(item) {
              for (var key in item) {
                if (key.indexOf('XX') === 0) {
                  var toJsonVar = item[key];
                  parseString(toJsonVar, function(err, res) {
                    item[key] = res;
                  });
                }
              }
            });
          });
  </code></pre>
  
  <p>as you might see I have <code>_.forEach</code> from lodash on the first 2 scopes, but in the 3rd one I have a <code>for in</code> loop which I am trying to convert to lodash but I am getting an error. </p>
  
  <pre><code>            _.forEach(item, function(key)) {
                if (key.indexOf('XX') === 0) {
                  var toJsonVar = item[key], toJsonRes;
                  parseString(toJsonVar, function(err, res) {
                    item[key] = res;
                  });
                });
  </code></pre>
  
  <p>there is the way I tried, what am I doing wrong ?</p>
  
  <p>The error says </p>
  
  <blockquote>
    <p>TypeError: undefined is not a function</p>
  </blockquote>
  
  <p>and the line of the error is</p>
  
  <pre><code>if (key.indexOf('XX') === 0) {
  </code></pre>