| 918 | cJSON_Delete(cJSON_DetachItemFromArray(array, which)); |
| 919 | } |
| 920 | cJSON *cJSON_DetachItemFromObject(cJSON *object, const char *string) |
| 921 | { |
| 922 | int i = 0; |
| 923 | cJSON *c = object->child; |
| 924 | while (c && cJSON_strcasecmp(c->string, string)) |
| 925 | i++, c = c->next; |
| 926 | if (c) |
| 927 | return cJSON_DetachItemFromArray(object, i); |
| 928 | return 0; |
| 929 | } |
| 930 | void cJSON_DeleteItemFromObject(cJSON *object, const char *string) |
| 931 | { |
| 932 | cJSON_Delete(cJSON_DetachItemFromObject(object, string)); |
no test coverage detected