I'm a bit stumped trying to determine if a given String is contained in my json.
Here's the stripped down starting point:
#include <ArduinoJson.h>
DynamicJsonDocument doc(1000);
void setup() {
Serial.begin(115200);
}
void loop() {
deserializeJson(doc, "[{\"name\":\"Marty\",\"uid\":\"asdf\"},{\"name\":\"Jim\",\"uid\":\"1234\"}]");
String uid="asdf";
// how to check if "asdf" is one of the UIDs inside the Json doc?
delay(5000);
}
I'm trying to determine whether "asdf" is one of the uids contained in the json doc. If I could simply iterate through the json I'd be all set but so far no joy.
Here's the above json formatted:
[
{
"name":"Marty",
"uid":"asdf"
},
{
"name":"Jim",
"uid":"1234"
}
]
I don't imagine anyone has any ideas?