Use faster loop when using lodash