# Json Path evaluator issues

**URL:** <https://developer.sailpoint.com/discuss/t/json-path-evaluator-issues/180514>\
**Category:** SHF Discussion and Questions\
**Tags:** jsonpath-evaluator, feedback, workflows, identity-security-cloud\
**Created:** [September 17, 2025, 5:40pm UTC](https://developer.sailpoint.com/discuss/t/json-path-evaluator-issues/180514 "2025-09-17T17:40:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SBahl](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@SBahl](https://developer.sailpoint.com/discuss/u/SBahl)\
**Post date:** [September 17, 2025, 5:40pm UTC](https://developer.sailpoint.com/discuss/t/json-path-evaluator-issues/180514/1 "2025-09-17T17:40:50Z")

</div>

```json
{
    "accountRequests": [
        {
            
            "provisioningTarget": "Active Directory",
            "ticketId": "72619262",
            "attributeRequests": [
                {
                    "operation": "Add",
                    "attributeName": "memberOf",
                    "attributeValue": "CN=sales,DC=helpco,DC=com"
                },
                {
                    "operation": "Add",
                    "attributeName": "mail",
                    "attributeValue": ""
                },
                {
                    "operation": "Add",
                    "attributeName": "sAMAccountName",
                    "attributeValue": "test1234"
                }
            ]
        }
    ]
}

```

For the above input when I use the below Json Path query

`$.accountRequests[?(@.provisioningTarget==‘Active Directory’)].attributeRequests[?(@.attributeName==‘sAMAccountName’)].attributeValue`

```json

[
  [
    "test1234"
  ]
]

```

Now the issue is that it should have returned a string response. Also, the result is correct if I switch the implementation from workflow to event trigger, but I need to use this as a string in the workflow. Any suggestions?

Also, the below gives exact string value back but this is not checking the attributeName dynamically.

`$.accountRequests[?(@.provisioningTarget==‘Active Directory’)].attributeRequests[2].attributeValue`

---

<div class="post-metadata">

**Author:** ![neeraj99](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/neeraj99/32/14001_2.png) [@neeraj99](https://developer.sailpoint.com/discuss/u/neeraj99)\
**Post date:** [September 17, 2025, 6:29pm UTC](https://developer.sailpoint.com/discuss/t/json-path-evaluator-issues/180514/2 "2025-09-17T18:29:40Z")

</div>

Yep a common issue related to array handling…

I am assuming that you are only looking for the samaccountName request’s value.

So for that maybe you can use this filter instead?

`$..attributeRequests[?(@.attributeName==‘sAMAccountName’)].attributeValue`

This would not filter based on the provisioningTarget, but you will be able to get the result as:

```auto
[
  "test1234"
]

```

And if you still want to make sure that you have the provisioingTarget check maybe you can make then on compare string’s such that if the provisioningTarget == AD then you go with the other steps.

Thanks….

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [November 16, 2025, 6:30pm UTC](https://developer.sailpoint.com/discuss/t/json-path-evaluator-issues/180514/3 "2025-11-16T18:30:30Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
