javascript: initialize an object with nested properties