Inline variable dereferencing of object field names

# Sebastian Malton (7 years ago)

An HTML attachment was scrubbed... URL: esdiscuss/attachments/20170723/63b44636/attachment-0001

# Logan Smyth (7 years ago)

Assuming in your first example you meant

query.$pull[team] = userId;

not

query[team] = userId;

then your second example is already valid a ES6 computed property and does exactly what you appear to be looking for.