Looking for the correct syntax for the Path Expression in the Query JSON action

  • 22 July 2020
  • 2 replies

Userlevel 3
Badge +9

I cannot figure out what the correct syntax should be for the path expression in the Query JSON action.

This is my sample data:



When I parse the userCreated it returns nicely John into my variable:



But this is the one I actually need: The id of the first element of mediaItems. So I use mediaItems/(0)/id:


 But this returns an error:




  1. What is the right syntax?
  2. Where is this explained/described?

Best answer by butlerj 22 July 2020, 16:23

View original

2 replies

Userlevel 5
Badge +19

@WouterT I know that in NWC we use JSONPath syntax, and believe that the correct syntax would be: $.mediaItem[0].id.


I tested this on JSONPath Online ( and it looks to come back correctly while mediaItems/(0)/id finds no match:


Let me know if that works.

Userlevel 3
Badge +9

Thanks!!! Very much appreciated the time you spent to even test your solution for me. It works like a charm.
Hey Nintex, a reference link or a few basic examples in the help file or for the action would really help a lot. Even a link in the error message would have saved me a lot of time.