JObject myObj = new JObject(); myObj.Add("name", "John"); myObj.Add("age", 30);
JObject myObj = JObject.Parse("{ 'name': 'Jane', 'age': 25 }"); myObj.Add("hobbies", new JArray("reading", "hiking"));This code parses a JSON string into a JObject called `myObj` and adds a new property called "hobbies" with an array of two strings as its value: "reading" and "hiking". In both examples, the JObject Add() method is used to add properties to the JObject. The JObject is from the Newtonsoft.Json library.