I am trying to make it so I can check whether a string is in a json.
For exmaple, in my JSON file exists name = Disp_R, name = Disp_L, name = Disp_C. And whenever Disp is in the string, the whole value should be stored in a list
Thats how I do it, but it don't work with the regex
var jTempObj = JObject.Parse(starcInformation.DeviceArray);
var tempItems = jTempObj.SelectTokens("$..items[?(@.name=='" + xmlInformation.Device + "')]");
foreach (var item in tempItems)
{
DeviceList.Add(item["name"].ToString());
}
I hope someone can help me :) Thanks a lot
edit