I'm working with Arduino to create JSON.
The code like below
String Temperature = "30";
String macAddressDevice = "ABC";
String Humidity = "56";
char json[] = "{\"mac\":macAddressDevice,\"temperature\":Temperature,\"humidity\":Humidity}";
mqtt.publish("TemperatureHumidity", json);
When I try to console.log in nodejs, it show me not the value but the variable name text:
{"mac":macAddressDevice,"temperature":Temperature,"humidity":Humidity}
Is there any way how to get the value with above json format ?