Is it possible to filter this so the message remains the same format wise but lose any lines that do not have a specific squawk?
{ "now" : 1661269874.3,
"messages" : 142666945,
"aircraft" : [
{"hex":"4d237a","mlat":[],"tisb":[],"messages":5,"seen":0.0,"rssi":-13.2},
{"hex":"407ab4","flight":"EDC522 ","alt_baro":36000,"alt_geom":37150,"gs":397.1,"ias":229,"tas":400,"mach":0.704,"track":333.7,"roll":0.4,"mag_heading":322.0,"baro_rate":0,"squawk":"1235","emergency":"none","category":"A1","nav_qnh":1013.6,"nav_altitude_mcp":36000,"lat":54.064362,"lon":-2.407654,"nic":9,"rc":75,"seen_pos":0.2,"version":2,"nic_baro":1,"nac_p":10,"nac_v":2,"sil":3,"sil_type":"perhour","gva":2,"sda":2,"mlat":[],"tisb":[],"messages":256,"seen":0.0,"rssi":-7.0},
{"hex":"4ca264","alt_baro":36000,"gs":494.0,"ias":251,"tas":440,"mach":0.760,"track":90.0,"track_rate":0.00,"roll":0.2,"mag_heading":99.8,"baro_rate":-64,"geom_rate":768,"squawk":"2272","category":"A3","nav_qnh":1013.6,"nav_altitude_mcp":36000,"nav_heading":99.8,"lat":53.399002,"lon":-3.103638,"nic":7,"rc":371,"seen_pos":43.3,"version":2,"nic_baro":1,"nac_p":8,"nac_v":0,"sil":3,"sil_type":"perhour","gva":1,"sda":2,"mlat":["altitude","gs","track","baro_rate","nac_v"],"tisb":[],"messages":792,"seen":0.2,"rssi":-10.5},
{"hex":"400796","flight":"LOG96AQ ","alt_baro":30450,"gs":414.0,"ias":240,"tas":386,"mach":0.648,"track":3.9,"roll":0.2,"mag_heading":355.4,"baro_rate":480,"squawk":"6206","nav_qnh":1013.2,"nav_altitude_mcp":31008,"mlat":[],"tisb":[],"messages":875,"seen":2.5,"rssi":-10.5},
{"hex":"406d90","flight":"EZY102K ","alt_baro":32000,"alt_geom":33200,"gs":428.5,"ias":251,"tas":412,"mach":0.700,"track":352.6,"track_rate":-0.03,"roll":-0.2,"mag_heading":344.7,"baro_rate":0,"geom_rate":64,"squawk":"3552","emergency":"none","category":"A3","nav_qnh":1013.6,"nav_altitude_mcp":32000,"nav_heading":0.0,"lat":53.631592,"lon":-2.448225,"nic":8,"rc":186,"seen_pos":29.1,"version":2,"nic_baro":1,"nac_p":9,"nac_v":1,"sil":3,"sil_type":"perhour","gva":2,"sda":2,"mlat":[],"tisb":[],"messages":581,"seen":1.1,"rssi":-9.9},
{"hex":"406e2e","alt_baro":27950,"squawk":"4720","category":"A3","version":2,"sil_type":"perhour","mlat":[],"tisb":[],"messages":647,"seen":58.8,"rssi":-11.4},
{"hex":"40650b","flight":"CFE99B ","alt_baro":35000,"alt_geom":36025,"gs":443.8,"ias":266,"tas":454,"mach":0.784,"track":154.9,"track_rate":0.00,"roll":-0.2,"mag_heading":169.6,"baro_rate":0,"geom_rate":0,"squawk":"6326","emergency":"none","category":"A3","nav_qnh":1013.6,"nav_altitude_mcp":35008,"nav_altitude_fms":35008,"nav_modes":["autopilot","althold","tcas"],"lat":54.555033,"lon":-3.232894,"nic":8,"rc":186,"seen_pos":0.4,"version":2,"nic_baro":1,"nac_p":11,"nac_v":2,"sil":3,"sil_type":"perhour","gva":2,"sda":2,"mlat":[],"tisb":[],"messages":4134,"seen":0.0,"rssi":-1.7},
{"hex":"40080f","flight":"LOG94JP ","alt_baro":33750,"gs":424.0,"ias":256,"tas":432,"mach":0.740,"track":335.6,"roll":0.2,"mag_heading":330.6,"baro_rate":-1120,"squawk":"7771","nav_qnh":1013.2,"nav_altitude_mcp":26000,"lat":54.420218,"lon":-2.753324,"nic":0,"rc":0,"seen_pos":6.0,"nac_p":0,"nac_v":0,"sil":0,"sil_type":"unknown","mlat":["lat","lon","nic","rc","nac_p","nac_v","sil","sil_type"],"tisb":[],"messages":1688,"seen":0.0,"rssi":-4.5},
{"hex":"461e21","category":"A3","version":2,"sil_type":"perhour","mlat":[],"tisb":[],"messages":497,"seen":224.1,"rssi":-12.5},
{"hex":"407944","category":"A5","version":2,"sil_type":"perhour","mlat":[],"tisb":[],"messages":186,"seen":106.6,"rssi":-11.9},
{"hex":"4007da","flight":"LOG33YB ","alt_baro":32000,"gs":394.0,"tas":384,"track":349.8,"roll":-14.1,"baro_rate":64,"squawk":"6353","lat":54.012886,"lon":-2.107598,"nic":0,"rc":0,"seen_pos":4.0,"nac_p":0,"nac_v":0,"sil":0,"sil_type":"unknown","mlat":["baro_rate","lat","lon","nic","rc","nac_p","nac_v","sil","sil_type"],"tisb":[],"messages":876,"seen":0.9,"rssi":-10.2},
{"hex":"406d8e","flight":"EZY71XP ","alt_baro":35775,"alt_geom":37050,"gs":448.9,"ias":256,"tas":444,"mach":0.768,"track":335.7,"track_rate":-0.09,"roll":-0.4,"mag_heading":328.2,"baro_rate":-1024,"geom_rate":-992,"squawk":"1045","emergency":"none","category":"A3","nav_qnh":1013.6,"nav_altitude_mcp":30016,"nav_heading":0.0,"lat":54.216691,"lon":-2.579929,"nic":8,"rc":186,"seen_pos":0.3,"version":2,"nic_baro":1,"nac_p":9,"nac_v":1,"sil":3,"sil_type":"perhour","gva":2,"sda":2,"mlat":[],"tisb":[],"messages":5110,"seen":0.0,"rssi":-3.0},
{"hex":"407180","category":"A3","version":2,"sil_type":"perhour","mlat":[],"tisb":[],"messages":502,"seen":194.7,"rssi":-12.8},
{"hex":"4ca64e","version":0,"sil_type":"unknown","mlat":[],"tisb":[],"messages":18,"seen":218.4,"rssi":-12.9},
{"hex":"4009d9","flight":"SHT9N ","alt_baro":34975,"alt_geom":36175,"gs":420.3,"ias":261,"tas":448,"mach":0.768,"track":165.5,"track_rate":0.06,"roll":1.4,"mag_heading":177.4,"baro_rate":0,"geom_rate":-32,"squawk":"5233","emergency":"none","category":"A3","nav_qnh":1012.8,"nav_altitude_mcp":35008,"nav_heading":177.2,"lat":53.907724,"lon":-2.794405,"nic":8,"rc":186,"seen_pos":14.1,"version":2,"nic_baro":1,"nac_p":9,"nac_v":1,"sil":3,"sil_type":"perhour","gva":2,"sda":3,"mlat":[],"tisb":[],"messages":7976,"seen":10.9,"rssi":-6.6},
{"hex":"407031","alt_baro":35000,"alt_geom":36225,"gs":447.8,"ias":262,"mach":0.776,"track":150.6,"mag_heading":161.2,"baro_rate":0,"geom_rate":-32,"squawk":"7310","category":"A3","nav_qnh":1013.6,"nav_altitude_mcp":35008,"nav_altitude_fms":35008,"nav_heading":158.9,"lat":54.279397,"lon":-1.072083,"nic":0,"rc":0,"seen_pos":0.8,"version":2,"nic_baro":1,"nac_p":9,"nac_v":1,"sil":3,"sil_type":"perhour","mlat":["altitude","alt_geom","lat","lon","nic","rc"],"tisb":[],"messages":348,"seen":0.8,"rssi":-11.2},
{"hex":"4078fd","category":"A3","version":2,"sil_type":"perhour","mlat":[],"tisb":[],"messages":3461,"seen":94.6,"rssi":-10.2},
{"hex":"405637","flight":"EZY63HZ ","alt_baro":36950,"alt_geom":38150,"gs":408.6,"ias":239,"tas":428,"mach":0.744,"track":156.9,"track_rate":-0.03,"roll":-0.2,"mag_heading":168.2,"baro_rate":-64,"geom_rate":-64,"squawk":"7001","emergency":"none","category":"A3","nav_qnh":1013.6,"nav_altitude_mcp":36992,"nav_heading":0.0,"lat":53.616447,"lon":-2.531541,"nic":8,"rc":186,"seen_pos":0.5,"version":2,"nic_baro":1,"nac_p":9,"nac_v":1,"sil":3,"sil_type":"perhour","gva":2,"sda":2,"mlat":[],"tisb":[],"messages":12441,"seen":0.0,"rssi":-3.9},
{"hex":"44c06b","alt_baro":27000,"alt_geom":27975,"gs":254.5,"ias":170,"tas":264,"mach":0.432,"track":156.9,"track_rate":-0.06,"roll":0.0,"mag_heading":174.0,"baro_rate":64,"geom_rate":0,"squawk":"7001","category":"A1","nav_qnh":1013.6,"nav_altitude_mcp":27008,"nav_altitude_fms":27008,"nav_heading":173.0,"nav_modes":["autopilot","althold","lnav"],"lat":54.047333,"lon":-2.841221,"nic":8,"rc":186,"seen_pos":57.2,"version":2,"nic_baro":1,"nac_p":11,"nac_v":2,"sil":3,"sil_type":"perhour","mlat":[],"tisb":[],"messages":11798,"seen":52.5,"rssi":-10.6},
{"hex":"3c648c","category":"A3","version":2,"sil_type":"perhour","mlat":[],"tisb":[],"messages":3622,"seen":120.4,"rssi":-11.1},
{"hex":"3965a2","flight":"AFR082 ","alt_baro":34000,"alt_geom":34925,"gs":462.5,"ias":290,"tas":486,"mach":0.836,"track":319.6,"roll":0.2,"mag_heading":314.8,"baro_rate":0,"geom_rate":32,"squawk":"0666","emergency":"none","category":"A5","nav_qnh":1012.8,"nav_altitude_mcp":34016,"nav_heading":314.3,"lat":55.371978,"lon":-3.750916,"nic":8,"rc":186,"seen_pos":15.6,"version":2,"nic_baro":1,"nac_p":9,"nac_v":1,"sil":3,"sil_type":"perhour","gva":2,"sda":2,"mlat":[],"tisb":[],"messages":12911,"seen":5.5,"rssi":-11.3},
{"hex":"400944","flight":"LOG8HM ","alt_baro":35000,"gs":388.0,"ias":227,"tas":394,"mach":0.680,"track":330.1,"roll":0.7,"mag_heading":329.1,"baro_rate":-64,"squawk":"7722","nav_qnh":1013.2,"nav_altitude_mcp":26000,"lat":55.668982,"lon":-3.889418,"nic":0,"rc":0,"seen_pos":4.8,"nac_p":0,"nac_v":0,"sil":0,"sil_type":"unknown","mlat":["altitude","lat","lon","nic","rc","nac_p","nac_v","sil","sil_type"],"tisb":[],"messages":15335,"seen":4.8,"rssi":-10.8},
{"hex":"4ca853","category":"A3","version":2,"sil_type":"perhour","mlat":[],"tisb":[],"messages":10547,"seen":287.7,"rssi":-10.9},
{"hex":"a48e1f","category":"A3","version":2,"sil_type":"perhour","mlat":[],"tisb":[],"messages":10182,"seen":126.9,"rssi":-11.3},
{"hex":"4d236a","category":"A3","version":2,"sil_type":"perhour","mlat":[],"tisb":[],"messages":10200,"seen":284.8,"rssi":-11.2}
]
}
Basically I want to only have the sensor populate with any squawks of 7001. In order to make it work with the FR24 card I need to keep the formatting. I’ve added some fake 7001 results in the above JSON.
Thanks in advance!!