All parsed json fields as labels

Is it possible to automatically take all parsed fields from json and add them to a labels set?
Something like that:

promtail:
  config:
    snippets:
      pipelineStages:
        - labels:
            all: