walk the object definitions of an object, modify them with a function.