if ( cJSON_IsTrue(cJSON_GetObjectItem(subitem, "isDayTime")) == 1) { /* do something if it's true */ } else { /* do something if it's false */ }