In the following example, destructuring assignment can be used as const {key1, key2, key3} = obj;.
However, is it possible to directly assign key1, key2, key3 (without looping) to their newValue using destructuring assignment?
const obj = {
key1: {oldValue: '1', newValue: '2'},
key2: {oldValue: '3', newValue: '4'},
key3: {oldValue: '5', newValue: '6'},
}
const key1 = obj.key1.newValue;
const key2 = obj.key2.newValue;
const key3 = obj.key3.newValue;