Firebase create multiple JsonObjects

Hello, I need some help with this project that I'm working on.
I've been connecting my arduino to firebase through nodemcu and I created an object in the database that gets updated.
That's how my database looks like this. 1 object arduino-a0097-default-rtdb with 3 fields.
image

I created the JsonObj like this

StaticJsonBuffer<1000> jsonBuffer;
 JsonObject& data = jsonBuffer.createObject();
 data["seconds"] = seconds;
 data["centi"] = centisecond;
 data["fails"] = count;

and received the object in nodemcu like this

StaticJsonBuffer<1000> jsonBuffer;
JsonObject& data = jsonBuffer.parseObject(nodemcu);
 int seconds = data["seconds"];
  int centisecond = data["centi"];
  int fails = data["fails"];
  Firebase.setFloat("Seconds", seconds);
  Firebase.setFloat("Centiseconds", centisecond);
  Firebase.setFloat("Fails", fails);

But now I need that every time I update the data to create a new object in the database. To have multiple objects arduino-a0097-default-rtdb with those 3 fields. Like multiple objects with different ids.
How can I do that?

PS: I tried to create a new JsonObject& data2 but it doesn't work.
Thank you so much!

Would You mind telling us, newbie helpers, (to Your project) what the big story is about?

I created a buzz wire game and when the game starts, there's also a timer starting. I also managed to count the failings. I want to send the data to Firebase so I can create a mobile app in which I can visualize the evolution.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.