# JSON Expression Invalid

**URL:** <https://developer.sailpoint.com/discuss/t/json-expression-invalid/10617>\
**Category:** SHF Discussion and Questions\
**Tags:** workflows, identity-security-cloud\
**Created:** [April 27, 2023, 12:08pm UTC](https://developer.sailpoint.com/discuss/t/json-expression-invalid/10617 "2023-04-27T12:08:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashish\_kumar3284](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@ashish\_kumar3284](https://developer.sailpoint.com/discuss/u/ashish_kumar3284)\
**Post date:** [April 27, 2023, 12:08pm UTC](https://developer.sailpoint.com/discuss/t/json-expression-invalid/10617/1 "2023-04-27T12:08:51Z")

</div>

I am using the below JSON expression. And it says invalid in the trigger inside the workflow. But, when I am trying the same expression to evaluate the value it is working fine.

$.requestedItemsStatus[?(@.name =~ /Eng.\*?/i && @.operation == “Add” && @.type == “ACCESS\_PROFILE”)]

Please refer to the below screenshot:

 ![image](https://global.discourse-cdn.com/sailpoint/original/2X/e/efc59bc4940469c7475711bcca0a3c1260c9c925.png)

Could you please confirm that workflow support these complex JSON expression?

---

<div class="post-metadata">

**Author:** ![colin\_mckibben](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/colin_mckibben/32/37182_2.png) [@colin\_mckibben](https://developer.sailpoint.com/discuss/u/colin_mckibben)\
**Post date:** [May 4, 2023, 5:28pm UTC](https://developer.sailpoint.com/discuss/t/json-expression-invalid/10617/2 "2023-05-04T17:28:12Z")

</div>

It appears the validation logic doesn’t like it when a regex is first in the set of criteria that uses `&&`. Try moving the regex to the last position.

`$.requestedItemsStatus[?(@.operation == "Add" && @.type == "ACCESS_PROFILE" && @.name =~ /Eng.*?/i)].name`

In the meantime, I will submit a bug report to engineering so the regex can be inserted anywhere.

---

<div class="post-metadata">

**Author:** ![colin\_mckibben](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/colin_mckibben/32/37182_2.png) [@colin\_mckibben](https://developer.sailpoint.com/discuss/u/colin_mckibben)\
**Post date:** [July 10, 2023, 1:09pm UTC](https://developer.sailpoint.com/discuss/t/json-expression-invalid/10617/3 "2023-07-10T13:09:15Z")

</div>

FYI, engineering fixed this. You can now put the regex pattern anywhere.

---

<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:** [September 8, 2023, 1:09pm UTC](https://developer.sailpoint.com/discuss/t/json-expression-invalid/10617/4 "2023-09-08T13:09:25Z")

</div>

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