0
People need to make a comparison between two object array to be able to return a css class and tell which field was changed.
the expected result would be thus:
VALOR ANTERIOR ---------------------------------- VALOR ATUAL
name: Rafael ------------------------------------ name: Rafael
age: 29 --------------------------------------- age: 30
I’m trying to
valorAtual.find(v1 => valorAnterior.find(v2 => v2.nome == v1.nome && v2.idade != v1.idade return 'campo-alterado')).
But the result is not as expected.
Opa Leo, then I need to compare two object arrays, because it will be a log record as it was before and as it was now, the arrays are coming like this: array1 [{key: rafael, value: 29}], array2 [{key: rafael, value: 30}], and on the screen I’ll put one next to the other and pass a background in the field that is with different values, so I need a logic that will return my class with the background or return empty
– Rafael Tavares