Making object hash-like