JArray.Remove(JToken) does not delete
问题 I have a JObject with a JSON like it: {"name" : "user1", "groups" : ["group 1", "group2"]} I would like to delete one group by the name. So I have a code like this: JObject userJson = JObject.Parse(user); JArray groups = userJson["groups"] as JArray; JToken group = new JValue (groupName); groups.Remove(group); However the method JArray.remove(Jtoken item) return false (that means that it couldn't be deleted). Here the information: https://www.newtonsoft.com/json/help/html/M_Newtonsoft_Json