value function

Extract value from an object