The best way is to use something like
Newtonsoft Json.NET[
^] to read the whole Json into "sensible" classes and process those, but it could be done with a Regex:
(?<Key>".*?":)(("(?<Value>.*?)")|(null))
Will extract all the Key/ value pairs.
To restrict it to a specific value only, replace the value part with the specific item:
string input = "{\"Id\":null,\"FName\":\"Vicky\",\"LName\":\"Denny\",\"DateofJoining\":null,\"Date\":\"2023 - 08 - 01T00: 00:00\",\"CreatedBy\":\"ICC0000389\"}";
string searchFor = "Vicky";
string regex = $"(?<Key>\".*?\":)\"(?<Value>{searchFor})\"";
if (Regex.IsMatch(input, regex))
{
Console.WriteLine("Matched");
}
else
{
Console.WriteLine("Not Matched");
}
}