function to print all the members of a flat object