Created
October 6, 2021 03:32
-
-
Save arthurbrazil/ea263509b3c96ef06806b89cd1e66ef2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// References | |
[ | |
{ | |
"id": "0001", | |
"qty": 0, | |
}, | |
{ | |
"id": "0002", | |
"qty": 0, | |
} | |
] | |
// Transactions | |
[ | |
{ | |
"id": "0001", | |
"qty": 42, | |
"otherstuff": "blah blah" | |
}, | |
{ | |
"id": "0001", | |
"qty": 8, | |
}, | |
{ | |
"id": "0002", | |
"qty": 20, | |
"otherstuff": "ignore me" | |
}, | |
] | |
// Expected Outputs | |
[ | |
{ | |
"id": "0001", | |
"qty": 50, | |
}, | |
{ | |
"id": "0002", | |
"qty": 20, | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment