The way I usually do that,
var update = {};
update[name] = data;
update.resolved = true;
where, name
is a variable.
I assume that's not the most efficient way of initialization, but it's not possible to use a variable in object notation initialization.
Other possible ways?