Use Query Loop variable in a child/nested Query Loop (or access it via code)?

After not much luck trying to solve this problem in the ‘standard’ way of JetEngine and Bricks, I’m wondering if the following ‘hacky’ way is possible:

  1. I can set an outer Query Loop (using JetEngine Query Builder) that retrieves sets of relations - in particular, the numeric IDs that connects a Parent to a Child (i.e. parent_object_id and the child_object_id)
  2. I am able to display the parent_object_id and child_object_id (as numbers) using the Dynamic Field widget in Bricks - so they definitely exists!

Is it then possible to use the parent_object_id or child_object_id in another nested Query Loop to obtain a normal Post object - so to easily display feature image, content etc? This is the part I don’t know if its possible, and if so, how to actually implement in Bricks.

(I have tried to use a Code widget within the outer Query Loop, with a simple “echo get_query_var(‘parent_object_id’);” - but this doesn’t display anything - I suspect it is referring to some other object and not the results in the loop. What’s the way to get this parent_object_id variable in this situation?)

Update: never found an answer to this, since my issue was resolved (turns out, fairly easily with JetSmartFilters - see original post). I’d be still interested in answering this question at some point in the future, but I suspect what I’m asking here is “against the grain” of how things should work (e.g. more like SQL than how Wordpress query should be used).