enable generator in object or array