Solved
Forum Discussion
Aleksandar_A
3 years agoContributor III
Hi @arvindnsn,
You can try to filter out documents that have “error” keys, and later on to split them using JSON Splitter Snap.
$result.filter(x => x.hasPath("error"))
Let me know if this helps you.
BR,
Aleksandar.
- deepak_shaw4 years agoContributor
Hi @bojanvelevski , Amazing 🙂 it’s working as expected.
Can you please explain a bit about the code you have written in the map i.e.$InvoiceLines.map(x=>{"LineNumber":{"@LineExtAmtExclTax":x.LineExtAmtExclTax,"$":x.LineNumber},"value":x.Employee})
Many thanks for your help,
Deepak Shaw.- bojanvelevski4 years agoValued Contributor
$InvoiceLines.map(x=>{"LineNumber":{"@LineExtAmtExclTax":x.LineExtAmtExclTax,"$":x.LineNumber},"value":x.Employee})
I’m glad I could help.
With the expression above, we’re mapping a specific value to every object inside the $InvoiceLines array. Basically the .map() function will iterate through the array, and for every object, it will map a JSON structure, using the values of that object.
- deepak_shaw4 years agoContributor
Thanks @bojanvelevski