How do you Add or Update a JProperty Value in a JObject

as @dbc described in the comment, you can simply use the indexer to make this happen.

var item = JObject.Parse("{ 'str1': 'test1' }");

item["str1"] = "test2";
item["str3"] = "test3";

see the fiddle for more details

Leave a Comment