Dynamic save images to query result

What would be the way to get this working Im trying to get my images to save to a path like this /pages_images/{{query.pages_id}}/ but it just places all images in /pages_images/ I assume im making a mistake in the dynamic syntax maybe?

Most likely. It works for us.
Maybe share the server action JSON?

thanks for the advice it was actually I needed query[0].pages_id