Closed biswajitjei02 closed 4 years ago
If you want to get the data at the root of your database, use Firebase.getJSON with the path parameter "/"
Firebase.getJSON(firebaseData, "/");
FirebaseJson &json = firebaseData.jsonObject();
FirebaseJsonData parseRsult;
json.get(parseRsult, "/newvalue");
if (parseRsult.success)
{
Serial.println(parseRsult.intValue);
}
json.get(parseRsult, "/value");
if (parseRsult.success)
{
Serial.println(parseRsult.intValue);
}
json.get(parseRsult, "/value1");
if (parseRsult.success)
{
Serial.println(parseRsult.stringValue);
}
For more usage of the FirebaseJson object
https://github.com/mobizt/Firebase-ESP32#parse-create-and-edit-json-objects https://github.com/mobizt/Firebase-ESP32/blob/master/examples/jsonObject/jsonObject.ino https://github.com/mobizt/Firebase-ESP32/tree/master/examples/FirebaseJson/examples
i want to store as a single Json a ,how it can be done ?
I don't understand what you mean.
Please read the Readme doc or start with the examples.
here want a Jason like this {newvalue: 32, value: 1,value1: "no"}