Hi,
I would like to compare two hashes, for example:
array1 = [{'id' => 124, 'name' => 'Kamal', 'job' => 'manager'},
{'id' => 314, 'name' => 'John', 'job' => 'developer'}]
array2 = [{'id' => 124, 'name' => 'Kamal', 'job' => 'managerZ'},
{'id' => 314, 'name' => 'JohnDD', 'job' => 'developer'}]
the id is not always ‘id’ , it could be UserID or EmployeeID or else
I want to have :
def compare_rows(array1,array2,id)
…
end
I want to report:
- row with UserID equal 124, job changed from ‘manager’ to ‘managerZ’
- row with UserID equal 314, name changed from ‘John’ to ‘JohnDD’ Thanks.