Forum Discussion

manohar's avatar
manohar
Contributor
3 years ago
Solved

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": [ "...
  • koryknick's avatar
    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.