Hi there,
I have an Object Array that looks something like this:
"Account":
[
{"AccountID": "1", "lineofBusiness": "AA", "pymntType": "Cash"},
{"AccountID": "2", "lineofBusiness": "BB", "pymntType": "CreditCard"},
{"AccountID": "3", "lineofBusiness": "CC", "pymntType": "Debit"},
{"AccountID": "4", "lineofBusiness": "CC", "pymntType": "CreditCard"}
]
Let's say I only want to clean up the array to accounts that has pymntType = CreditCard only, so then the expression would look something like this:
filter(#{ExperiencePlatform.Profile.Account, "pymtType", ["CreditCard"]} --> this returns a listObject with pymtType == CreditCard only.
At this point, I have couple questions:
1) What can I do with this listObject? I am not aware of any functions that accept listObject as a parameter
2) How do I extract a value of this new listObject? For example, I want the lineofBusiness at position 0.
Thanks.
Solved! Go to Solution.
Views
Replies
Total Likes
One of the places where listObject is used on custom actions. Take a look at this documentation.
To retrieve account object values have a look at the collection management functions
One of the places where listObject is used on custom actions. Take a look at this documentation.
To retrieve account object values have a look at the collection management functions
Hi @SatheeskannaK,
Is it possible to extract the listObject with the filter function, then grab a value out of listObject? In my example, something like filter(#{ExperiencePlatform.Profile.Account, "pymtType", ["CreditCard"]}.lineofBusiness
Thanks.
Views
Replies
Total Likes
Can you try along these lines,
serializeList(#{ExperiencePlatform.Profile.Account.all(currentDataPackField.pymntType == "CreditCard").lineOfBusiness}, ",", true)
Expected output: BB,CC