functional programming helpers to be used with object's keys and values