Decode can decode an object key into the struct