manohar
3 years agoContributor
Filter expression on arrays
hi there, I have this json
[
{
"filename": [
"Coupa_Supplier_SB_Tax_Cert_PO_4501923290",
"Coupa_Supplier_SB_Tax_Cert_PO_4501888888"
],
"id": 16755,
"docid": [
"...
- 4 years ago
You might be able to get around it by using the following expression in a mapper before trying to process the $messages value:
sl.ensureArray($messages)
This way, if it is a single object, it will be a single-entry array. If it is already an arrary, it simply passes through.