Hi @Vijitha,
Refer this discussion - Workflow - Remove Entitlements from selected source - #2 by sharvari
This might help.
You may need to use a different path, such as $.getAccess.accessItems[*].value
, which retrieves all entitlement values as an array. Also add the filter to fetch entitlements from a particular source.