Fix forIn rather than each for iterating on object

Tiny bug fix:
Should use `_.forIn(obj)` rather than `_.each(obj)` for iterating over an object. All works fine, until the object happens to have a attribute `length`! Then lodash thinks it's an array and starts looking for `obj[0]`.

I ran up against this as one of my tables has a column `length`.