I am currently doing a college project and most of my background comes from JS & Python. I have an Arduino that is receiving data and using ArduinoJSON to take in settings and deserialize them. I have it set up that the setting is a const char* setting
. Which can contain a range of data types (mostly int or bool). But I am focused on trying to get a bool value from the char.
setting = doc["setting"];
if (setting == "true") {
test = true;
} else if (setting == "false") {
test = false;
}
I tried the above with no luck. I also tried converting the char to a string but with no luck. I also tried to use the .compare() function with no luck either. What would you guys recommend?