How to parse nested JSON

Hi all,
i got a JSON value from MQTT and have no success to pare a value from them.
JSON-MQTT-Message:
{“Time”:“2024-03-23T12:57:47”,“SML”:{“curr_w”:210}}
I am able to find “SML” … but not curr_w or the value …

next problem… if i try to enable the line //id(itho_state) = svalue;
the device crashes.
I am unable to check / list / debug the content while in “lambda”-part
I am grateful for every hint
I’ve tried the following:

globals:
   - id: OLEDMessage
     type: std::string
 
 mqtt:
 ....  
   on_json_message:
     topic: fhem/sensors/Tasmota_ORBIS/tele/SENSOR
     then:
       - lambda: |-
               id(OLEDMessage) = "N A N";
               if (x.containsKey("SML")){
                 id(OLEDMessage) = "SMLfound"; 
                 const char *svalue = x["SML"];
                 //id(OLEDMessage) = svalue;
               }
mqtt:
  sensor:
    - name: " whatever current"
      device_class: "current"
      state_topic: "fhem/sensors/Tasmota_ORBIS/tele/SENSOR"
	  #The bit below is how to get nested value
      value_template: "{{ value_json.sml.curr_w }}"
      unit_of_measurement: "A"
      unique_id: current_whatever

What I did when I had a nested json was to bring it out as a new sensor in mqtt. You could then refer to that value in your ESPhome device.

Thanks for the answer…
Ok, parsing in HA may be an option … but would be great to find a possibility to do this on ESPHome device directly.