โ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 ๐