ISC JSON path evaluator from SailPoint does not behave the same as ISC workflows

Oh yeah, you are completely right here @colin_mckibben !

JSONpath indeed doesn’t seem to support first filtering a JSON array, and then taking the first element from the subarray. According to the RFC, there is no way to get the first element of the filtered result of a JSON array using only one JSONpath expression. Instead the workaround suggestion seems to perform this task outside of JSONpath, for example by using two JSONpaths. One JSONpath expression to filter your JSON array, then ensuring you get the results and ensure it is still a JSON object (a JSON array), and then use another JSONpath to obtain the results. In a programming language like Java, Python or Ruby this is easily done. Follow-up question then is. How can we achieve this in ISC workflows?

Suppose my workflow performs an action (for example to get all accounts of a specific identity) and then gets a JSON response which is an array. Is it then possible in ISC workflows to apply a filter on the results with a JSONpath expression, store the result in a variable, and then apply a second JSONpath expression on that variable, to get the first record? I tried with the define variable operator, but did not succeed. Maybe because it expects to return a string instead of a structured JSON object?