Я пытаюсь сопоставить / отфильтровать следующие значения lineId в массиве unmatchedIds, чтобы затем отфильтровать результирующий набор exampleFile по processorTransactionId. Результатом будет удаление последнего объекта financialTransactionEntity с processorTransactionId = "000000062121029333".
Теоретически размеры как массива unmatchedIds, так и массива exampleFile могут быть неограниченными.
Любые рекомендации / советы / примеры будут высоко оценены. Мне трудно использовать фильтр данных для достижения этой цели.
{
"unmatchedIds": [
{
"lineId": "000000062121029111"
},
{
"lineId": "000000062121029222"
}
]
}
exampleFile
[{
"financialTransactionEntity": {
"cardAcceptor": {
"name": "Burger Inc.",
"countryCode": "GBP"
},
"financialTransaction": {
"debitOrCredit": "C",
"amountInOriginalCurrency": {
"amount": "0000001000",
"exponent": "2"
},
"originalCurrencyCode": "826",
"transactionDate": "2020-02-18"
},
"processorTransactionId": "000000062121029111"
}
},
{
"financialTransactionEntity": {
"cardAcceptor": {
"name": "McDonalds Inc.",
"countryCode": "GBP"
},
"financialTransaction": {
"debitOrCredit": "C",
"amountInOriginalCurrency": {
"amount": "0000002000",
"exponent": "2"
},
"originalCurrencyCode": "826",
"transactionDate": "2020-02-18"
},
"processorTransactionId": "000000062121029222"
}
},
{
"financialTransactionEntity": {
"cardAcceptor": {
"name": "McDonalds Inc.",
"countryCode": "GBP"
},
"financialTransaction": {
"debitOrCredit": "C",
"amountInOriginalCurrency": {
"amount": "0000002000",
"exponent": "2"
},
"originalCurrencyCode": "826",
"transactionDate": "2020-02-18"
},
"processorTransactionId": "000000062121029333"
}
}
]