Hi,
I’m trying to insert data into InfluxDB using JSON data format over MQTT. The JSON string contains values for 2 different parameters that I want to insert to two different rows of InfluxDB. How can we do this?
For example,
sample JSON string:
[
{
“DataType”:17,
“Data_Value”:6,
“Connection”:“192.168.5.110”,
“Parameter”:“current”,
“Topic”:“EVENT”
},
{
“DataType”:17,
“Data_Value”:56,
“Connection”:“192.168.5.110”,
“Parameter”:“voltage”,
“Topic”:“EVENT”
}
]
There is a table with fields “DataType”, “Data_Value”, “Connection”, “Parameter”, “Topic”.
I want to enter two rows for the given JSON string. How do we do that?
Thanks in advance.