Duktape provides two mechanisms for interacting with property accesses programmatically:
Proxy
See How to use virtual properties for examples.