flatten mixin for objects