(Solved) Inserting multiple rows using JSON

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:


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.

Hi @sahebdatta, are you using Telegraf to get these from your MQTT broker, or are you writing them to InfluxDB’s APIs yourself?

1 Like

I am using telegraf but the problem is solved now.
Thanks for your response. It had to do with JSON format. I got the solution from here JSON input data format | Telegraf 1.17 Documentation