12-09-2022 06:03 AM
Hello Community,
Below is input
[
{
“name”=“ABC”
“ID”=“D.0012”
},
{
“name”=“XYZ”
“ID”=“B.002”
},
{
“name”=“OPQ”
“ID”=“E.0012”
},
{
“name”=“LMN”
“ID”=“J.0012”
},
{
“name”=“DEF”
“ID”=“C.0012”
},
{
“name”=“RST”
“ID”=“B.05”
}
]
I have millions of records like this , I want to filter them based upon one key named as “ID”: and need the data for only the object which have “J.” or “C.” and discard all the rest ID
Solved! Go to Solution.
12-09-2022 06:35 AM
@swatifunde - The simplest approach is to use a filter snap and put a condition of startsWith either J or C. Snap below:
Would the ID be always in the format of “Letter.(number)(number)(number)(number)”?
If yes, you can use the above-mentioned approach. Also, if you’re expecting ID to be Null/blank and want them to pass, please do select “Null-safe access”.
Regards,
Darsh
12-09-2022 06:35 AM
@swatifunde - The simplest approach is to use a filter snap and put a condition of startsWith either J or C. Snap below:
Would the ID be always in the format of “Letter.(number)(number)(number)(number)”?
If yes, you can use the above-mentioned approach. Also, if you’re expecting ID to be Null/blank and want them to pass, please do select “Null-safe access”.
Regards,
Darsh
12-12-2022 05:09 PM
Or you can also use match… e.g.
sl.ensureArray($ID.match(/J|C/g)).length > 0
12-30-2022 04:04 AM
Its working as expected, Thank you so much 🙂