Loki Grafana - promtail pipeline breaks after recreating the secret

After watching the Grafana Loki training, I tried to follow the instructions in the promtail pipeline training but my log differs from the one shown in the video. No “log:” property to search as shown in the video, my starts with “level”. secondly after I recreated the secret my logs stopped flowing, so maybe the promtail config or secret messed it up. Trying to figure out what broke. Has anyone else had similar experience? should I be using “level” instead of “log” property. What should my promtail.yaml look like if I should make a change. Thanks in advance.
promtail.yaml - below

  - match:
      selector: '{app="api"}'
      stages:
        - json:
            expressions:
              log:
        - json:
            source: log
            expressions:
              code: code
              method: method
        - labels:
            code:
            method:


I was able to resolve it by flattening the expression from log in the video to just directly code and method and make it work.
scrape_configs:

See also loki/production/ksonnet/promtail/scrape_config.libsonnet at main · grafana/loki · GitHub for reference

  • job_name: kubernetes-pods
    pipeline_stages:
    • cri: {}
    • match:
      selector: ‘{app=“api”}’
      stages:
      - json:
      expressions:
      code: code
      method: method
      - labels:
      code:
      method: