When working with TypeScript objects, is there a way to loop through a dictionary and set properties of another dictionary similar to how it is done in JavaScript?
for (let key in dict) {
if (obj.hasOwnProperty(key)) {
obj[key] = dict[key];
}
}
If obj
is a TypeScript object (an instance of a class), is there a method to achieve the same operation?