My JSON config.json:
[
{
"names":"Steam",
"count": 1,
},
{
"names":"game",
"count": 2,
}
]
I need to update count's property in the array in c#.
I tried
JObject objectproperty = JObject.Parse(File.ReadAllText(@"config.json"));
but this gives me the error
Newtonsoft.Json.JsonReaderException: "Error reading JObject from JsonReader. Current JsonReader item is not an object: StartArray. Path '', line 1, position 1."
JArrayfor arrays, notJObject(which is, obviously, for objects)