Question: Using DataWeave Fraud attempt challenge problem: Suspects are listed in a JSON Object, each suspect has an object of their own that lists a clue(array
Using DataWeave
Fraud attempt challenge problem: Suspects are listed in a JSON Object, each suspect has an object of their own that lists a clue(array of #) and their ID(a single #). Loyal consumers know if you add 1 to the each value in clue and multiply them together, you get a trueID(result) and if they match it displays a status of "innocent" else it displays a status of "guilty"


"suspect1": \{ "clue": {[3,2,6], "id": 84 \} "suspect2": \{ "clue": [7,1,3], "id": 62 \} "suspect3": \{ "clue": [4,5,9] "id": 300 \} Output: \{ "suspect1": "clue": 3, 2, ], "id": 84, "result": 84, "status": "innocent" "suspect2": \{ "clue": [ 7, 1, 3 ], "id": 62, "result": 64, "status": "guilty" \}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
