I have two arrays:
First array:
generalInfo = [{"fName": "Suku", "lName": "Brown", "sex": "Male", "Id": "RY12S"}, {"fName": "Mary", "lName": "Sue", "sex": "Female", "Id": "UT72W"}]
Second array:
paymentInfo = [{"Id": "RY12S", "amount": "1000.00", "purpose": "rent", "date": "2017-17-07"}, {"Id": "UT72W", "amount": "5000.00", "purpose": "renovation", "date": "2017-15-07"}]
Now, I want to be able to compare the Id field for the both arrays and return their unique information.
At least the third should look like this:
specificInfo = [{"Id": "RY12S","fName": "Suku", "lName": "Brown", "amount": "1000.00", "purpose": "rent"}, {"Id": "UT72W","fName": "Mary", "lName": "Sue", "amount": "5000.00", "purpose": "renovation"}]
Is there any easy way to achieve this?