i have two arrays of the same length that i would like to use the contents. index[0] of both array a and b should be used together when i am saving to a json file.i am guessing i need to lopp thru them in order to access each index and save the contents to a template json every time. i also would like that it returns a toString() format of the json, so each iteration for each index returns something.
public string Show(string[] id, string[] msg)
{
// opening code for json file with jobject and jsontexreader
for (int i = 0; i <= id.Length; i++ )
{
Newid = id[i];
Newmsg = msgs[i];
// setting the data to the json file
JObject temp = (JObject)o1.SelectToken(path1);
temp["data"] = msg;
JObject tem = (JObject)o1.SelectToken(path2);
tem["ksid"] = id;
}
return ??;
}