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