ArduinoMqttClient: Changing "body" in message

Hello.

My device, IDE, and libraries used are as follows:

  • Arduino MKR WiFi 1010
  • IDE Version: 1.8.10
  • ArduinoMqttClient.h
  • WiFiNINA.h

I can send data to the cloud using the "mqttClient.print()", and I noticed that in the Telemetry window I see something like this:

{
  "body": {
    "hello"
  },
  "enqueuedTime": "2020-02-12T02:23:54.627Z"
}

Is there a way to change the word "body" to "heartbeat"? Or something other than that?

What's the "Telemetry window"?

You failed to provide the used code in your post. If you use just above mentioned libraries the word "body" is inserted by some other component, probably your "Telemetry window".