How to
add JArray into JObject? I am getting an exception when changing the jarrayObj into JObject.
parameterNames = "Test1,Test2,Test3";
JArray jarrayObj = new JArray();
foreach (string parameterName in parameterNames)
{
jarrayObj.Add(parameterName);
}
JObject ObjDelParams = new JObject();
ObjDelParams["_delete"] = jarrayObj;
JObject UpdateAccProfile = new JObject(
ObjDelParams,
new JProperty("birthday", txtBday),
new JProperty("email", txtemail))
I need output in this form:
{
"_delete": ["Test1","Test2","Test3"],
"birthday":"2011-05-06",
"email":"
[email protected]"
}