Copy object with results of getters
问题 I have an object that contains a getter. myObject { id: "MyId", get title () { return myRepository.title; } } myRepository.title = "MyTitle"; I want to obtain an object like: myResult = { id: "MyId", title: "MyTitle" } I don't want to copy the getter, so: myResult.title; // Returns "MyTitle" myRepository.title = "Another title"; myResult.title; // Should still return "MyTitle" I've try: $.extend(): But it doesn't iterate over getters. http://bugs.jquery.com/ticket/6145 Iterating properties as