Get or set nested variables of an object