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, need to create a :
def compare_rows(array1,array2,id)
I want to report:
row with id equal 124, job changed from 'manager' to 'managerZ'
row with id equal 314, name changed from 'John' to 'JohnDD'
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 74:08:05 |
Calls: | 6,657 |
Calls today: | 3 |
Files: | 12,203 |
Messages: | 5,332,501 |
Posted today: | 1 |