This is an interesting problem that I don’t think has an easy answer. Hopefully someone more knowledgable can come up with something clever.
Although LogQL’s json filter can flatten nested JSON, it does not flatten lists (I assume it’s because elements in list don’t need to be unique). So I don’t think there is a satisfying answer here from LogQL. You can try to tackle this from the log pipeline. FluentD or Logstash have ways to process nested json (see Split filter plugin | Logstash Reference [8.9] | Elastic).