Termination workflow to add a condition where we can check entitlement name and skip from revoking

Hi Team

As work around first i was trying to remove entitlement from selected source. By referring the below post.
(Workflow - Remove Entitlements from selected source).

In loop input, specified a filter that will filter the sources that we are interested in revoking entitlements for.
Loop input:
$.hTTPRequest.body[0].access[?(@.type == “ENTITLEMENT” && @.source.name == “Active Directory DEV”)

But i was not able to filter the source, other entitlements are also getting revoked.
Do we need to make any changes?