https://stackoverflow.com/questions/55518720

CSharp · Console

/Program.cs

using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
					
public class Program
{
	public static void Main()
	{
        string json = @"
            {
              ""payload"": [
                {
                  ""a"": ""yes"",
                  ""b"": ""no"",
                  ""c"": ""maybe""
                },
                {
                  ""a1"": ""agg"",
                  ""b"": ""no"",
                  ""c"": ""maybe""
                },
                {
                  ""a"": ""L"",
                  ""b"": ""k"",
                  ""c"": ""maybe""
                }
              ]
            }";
		
		JToken root = JToken.Parse(json);
		foreach (JToken match in root.SelectTokens("payload[*].a"))
		{
			match.Replace(new JValue("ZZZZZZZZ"));
		}		
		
		Console.WriteLine(root.ToString());
	}
}

;