web
Vous êtes hors connexion. Ceci est une version en lecture seule de la page.
close


Publié Wed, 30 Jul 2025 09:54:08 GMT par Frédéric Dallot
Hello
I have a workflow and i request user data with API and i want to request user's group.
But there is more than one group for this user and i want to filter in JSON data, the group starting with DW_.
I can only request $.Item[0].Name or $.Item[X].Name but i don't know the number of the table.

Can we filter on the name of the group with a wildcard?
If not can i filter the name of the group otherway?
Thanks
Publié Mon, 04 Aug 2025 22:22:54 GMT par Jacob Eaton Software Integration Specialist

Hey,

I believe you can use JSONPath filters to make a selection from the returned JSON.

Filters

Filters are logical expressions used to filter arrays. An example of a JSONPath expression with a filter is

$.store.book[?(@.price < 10)]

where @ represents the current array item or object being processed. Filters can also use $ to refer to the properties outside of the current object:

$.store.book[?(@.price < $.expensive)]

An expression that specifies just a property name, such as [?(@.isbn)], matches all items that have this property, regardless of the value.

For your example try $.Item[?(@.Name =~ /^DW_.*/)].Name, I tested in the new workflow designer and it appeared to work. You could also just store all of the items in a keyword field and then use an expression to get the one you want.

Regards,
Jacob Eaton

You must be signed in to post in this forum.