More idiomatic way to move item from one dict value(list) to another?
I would propose something like so (given that you have assumed no dupes, etc)

function migrateValues(obj, srcKey, destKey, value) {
    return {
        ...obj,
        [srcKey]: obj[srcKey].filter(w =&gt; w !== value),
        [destKey]: obj[destKey].concat(value)
    };
}


We spread obj, and then overwrite the srcKey and destKey properties.

There are several reasonable ways to make obj[srcKey].filter and obj[destKey].concat avoid TypeErrors, which is best is dependent on what you have planned for the function.