[LogQL] How to query logs based on the output of another one?

I haven’t tried this, but looks promising: Extract Loki fields into Grafana variables (workaround)