I have a model structured like this:
class Model {
from: number;
values: { [id: string]: number };
originalValues: { [id: string]: number };
}
After that, I initialize an array of models:
I am trying to compare the values with the original values using the following code snippet:
for (let edited of this.arr) {
edited.model.forEach(m => {
if (Object.values(m.originalValues) == Object.values(m.values)) {
// console.log(equal);
} else {
// not equal
}
});
However, even when they are equal, it always shows "not equal". Here is an example of how the values and original values look like:
originalValues: {11c33aaaaaaaaasafsdf33: 23.5}
What am I doing wrong here?