I have a List in an MVC app that contains 141 entries. How do I create a JSON from that list and add other properties to it. I am currently trying the following but I get an error on the second iteration stating that the property already exists:
dynamic jsonOb = new JObject();
foreach(var titles in titleList)
{
jsonOb.Add("TitleNumber", titles.ToString());
jsonOb.Add("ProjectID", projid.ToString());
jsonOb.Add("AddedBy", user);
jsonOb.Add("DateAdded", Convert.ToString(DateTime.Now));
}