I have a very simple piece of code that I just cannot work out.
JObject obj = new JObject { "Name", "John" };
JArray array = new JArray();
array.Add(obj);
// throws "Can not add Newtonsoft.Json.Linq.JValue to Newtonsoft.Json.Linq.JObject"
I have tried many different things to add a JObject to a JArray. What am I doing wrong?