CSharp · Console
using System;
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json.Linq;
public class Program
{
public static void Main()
{
string json = "{\"issues\":[{\"id\":\"250271\",\"self\":\"KeyUrl1\",\"key\":\"Key-8622\",\"fields\":{\"attachment\":[{\"self\":\"AttachmentUrl1\",\"id\":\"106198\",\"filename\":\"export.htm\"}],\"customfield_11041\":\"Test\"}},{\"id\":\"250272\",\"self\":\"KeyUrl2\",\"key\":\"Key-8621\",\"fields\":{\"attachment\":[{\"self\":\"AttachmentUrl2\",\"id\":\"106199\",\"filename\":\"lmn.htm\"}],\"customfield_11041\":\"Test\"}},]}";
var jObject = JObject.Parse(json);
var issues = jObject["issues"] as JArray;
var records = issues.Where(x => !x["fields"]["attachment"].Any() || !x["fields"]["attachment"].Any(y => y["filename"].Contains("export"))).ToList();
Console.WriteLine(records.Count);
}
}