code: function iterObject(object, func, containingSnapshot, thisArg) {
          if (!(object instanceof Object))
            return;
  
          if (object instanceof Array) {
            for (var i = 0; i < object.length; i++) {
              var res = func.call(thisArg, object, i, object[i],
                                  containingSnapshot);
              if (res === null)
                continue;
              if (res)
                iterObject(res, func, containingSnapshot, thisArg);
              else
                iterObject(object[i], func, containingSnapshot, thisArg);
            }
            return;
          }
  
          for (var key in object) {
            var res = func.call(thisArg, object, key, object[key],
                                containingSnapshot);
            if (res === null)
              continue;
            if (res)
              iterObject(res, func, containingSnapshot, thisArg);
            else
              iterObject(object[key], func, containingSnapshot, thisArg);
          }
        }
docs: Iterates over the fields in the object, calling func for every
  field/value found.
  
  @return {object} If the function does not want the field's value to be
  iterated, return null. If iteration of the field value is desired, then
  return either undefined (if the field value did not change) or the new
  field value if it was changed.