Suggestions on filtering out an object in an array between SPLIT and JOIN

Hi and welcome.

You can use a switch node in a split join in auto mode, just check recreate sequence check box.
In this example I check that payload.associationCode == "CT".

[{"id":"2c935dd7c9726c25","type":"inject","z":"d1395164b4eec73e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"id\":969377,\"userID\":0,\"timeStamp\":\"2024-01-11T14:43:56.117\",\"comments\":\"73 stavros\",\"callsign\":\"SV2RUJ\",\"associationCode\":\"SV\",\"summitCode\":\"TL-067\",\"activatorCallsign\":\"SV2RUJ/P\",\"activatorName\":\"STAVROS\",\"frequency\":\"28.324\",\"mode\":\"SSB\",\"summitDetails\":\"Portes, 645m, 2 pts\",\"highlightColor\":\"red\"},{\"id\":969376,\"userID\":0,\"timeStamp\":\"2024-01-11T14:43:32.863\",\"comments\":\"QRV NOW CQ SOTA [SOTA Spotter]\",\"callsign\":\"CT1MH\",\"associationCode\":\"CT\",\"summitCode\":\"BL-012\",\"activatorCallsign\":\"\\nCT1MH/P\",\"activatorName\":\"Not recognised\",\"frequency\":\"14.286\",\"mode\":\"ssb\",\"summitDetails\":\"Decabelos, 1052m, 8 pts\",\"highlightColor\":\"red\"},{\"id\":969375,\"userID\":0,\"timeStamp\":\"2024-01-11T14:39:53.37\",\"comments\":\"[VK port-a-log]\",\"callsign\":\"OE9HRV\",\"associationCode\":\"OE\",\"summitCode\":\"VB-493\",\"activatorCallsign\":\"OE9HRV/P\",\"activatorName\":\"Herbert\",\"frequency\":\"28.444\",\"mode\":\"ssb\",\"summitDetails\":\"Staufen, 1465m, 6 pts\",\"highlightColor\":\"red\"},{\"id\":969374,\"userID\":0,\"timeStamp\":\"2024-01-11T14:37:04.83\",\"comments\":\"73 stavros Las call \",\"callsign\":\"SV2RUJ\",\"associationCode\":\"SV\",\"summitCode\":\"TL-067\",\"activatorCallsign\":\"SV2RUJ/P\",\"activatorName\":\"STAVROS\",\"frequency\":\"14.306\",\"mode\":\"SSB\",\"summitDetails\":\"Portes, 645m, 2 pts\",\"highlightColor\":\"red\"},{\"id\":969373,\"userID\":0,\"timeStamp\":\"2024-01-11T14:37:03.863\",\"comments\":null,\"callsign\":\"SQ9OZM\",\"associationCode\":\"SP\",\"summitCode\":\"BZ-080\",\"activatorCallsign\":\"3Z7Z/P\",\"activatorName\":\"Not recognised\",\"frequency\":\"28.340\",\"mode\":\"SSB\",\"summitDetails\":\"Wierzbanowska Góra, 778m, 4 pts\",\"highlightColor\":\"red\"},{\"id\":969372,\"userID\":0,\"timeStamp\":\"2024-01-11T14:33:46.087\",\"comments\":null,\"callsign\":\"SV2RUJ\",\"associationCode\":\"SV\",\"summitCode\":\"TL-067\",\"activatorCallsign\":\"SV2RUJ/P\",\"activatorName\":\"STAVROS\",\"frequency\":\"28.470\",\"mode\":\"SSB\",\"summitDetails\":\"Portes, 645m, 2 pts\",\"highlightColor\":\"red\"},{\"id\":969371,\"userID\":0,\"timeStamp\":\"2024-01-11T14:31:56.043\",\"comments\":\"[G8CPZ{GB}]: Andy \",\"callsign\":\"SMS\",\"associationCode\":\"G\",\"summitCode\":\"LD-050\",\"activatorCallsign\":\"G8CPZ/P\",\"activatorName\":\"Andy\",\"frequency\":\"28.0477\",\"mode\":\"cw\",\"summitDetails\":\"Gummer's How, 321m, 1 pt\",\"highlightColor\":\"red\"},{\"id\":969370,\"userID\":0,\"timeStamp\":\"2024-01-11T14:31:11.72\",\"comments\":\"QRV NOW CQ SOTA [SOTA Spotter]\",\"callsign\":\"CT1MH\",\"associationCode\":\"CT\",\"summitCode\":\"BL-012\",\"activatorCallsign\":\"\\nCT1MH/P\",\"activatorName\":\"Not recognised\",\"frequency\":\"7.166\",\"mode\":\"ssb\",\"summitDetails\":\"Decabelos, 1052m, 8 pts\",\"highlightColor\":\"red\"},{\"id\":969369,\"userID\":0,\"timeStamp\":\"2024-01-11T14:29:22.087\",\"comments\":null,\"callsign\":\"SV2RUJ\",\"associationCode\":\"SV\",\"summitCode\":\"TL-067\",\"activatorCallsign\":\"SV2RUJ/P\",\"activatorName\":\"STAVROS\",\"frequency\":\"28.470\",\"mode\":\"SSB\",\"summitDetails\":\"Portes, 645m, 2 pts\",\"highlightColor\":\"red\"},{\"id\":969368,\"userID\":0,\"timeStamp\":\"2024-01-11T14:28:21.217\",\"comments\":\"73 stavros\",\"callsign\":\"SV2RUJ\",\"associationCode\":\"SV\",\"summitCode\":\"TL-067\",\"activatorCallsign\":\"SV2RUJ/P\",\"activatorName\":\"STAVROS\",\"frequency\":\"28.470\",\"mode\":\"SSB\",\"summitDetails\":\"Portes, 645m, 2 pts\",\"highlightColor\":\"red\"},{\"id\":969367,\"userID\":0,\"timeStamp\":\"2024-01-11T14:24:48.653\",\"comments\":null,\"callsign\":\"SQ9OZM\",\"associationCode\":\"SP\",\"summitCode\":\"BZ-080\",\"activatorCallsign\":\"3Z7Z/P\",\"activatorName\":\"Not recognised\",\"frequency\":\"7.095\",\"mode\":\"SSB\",\"summitDetails\":\"Wierzbanowska Góra, 778m, 4 pts\",\"highlightColor\":\"red\"},{\"id\":969366,\"userID\":0,\"timeStamp\":\"2024-01-11T14:20:39.843\",\"comments\":null,\"callsign\":\"DM1DF\",\"associationCode\":\"DM\",\"summitCode\":\"BM-271\",\"activatorCallsign\":\"DM1DF/P\",\"activatorName\":\"Daniel\",\"frequency\":\"28.441\",\"mode\":\"SSB\",\"summitDetails\":\"Eschenberg, 1042m, 10 pts\",\"highlightColor\":\"red\"},{\"id\":969365,\"userID\":0,\"timeStamp\":\"2024-01-11T14:20:26.013\",\"comments\":null,\"callsign\":\"SQ9OZM\",\"associationCode\":\"SP\",\"summitCode\":\"BZ-080\",\"activatorCallsign\":\"3Z7Z/P\",\"activatorName\":\"Not recognised\",\"frequency\":\"7.112\",\"mode\":\"SSB\",\"summitDetails\":\"Wierzbanowska Góra, 778m, 4 pts\",\"highlightColor\":\"red\"},{\"id\":969364,\"userID\":0,\"timeStamp\":\"2024-01-11T14:17:45.573\",\"comments\":\"Marko [VK port-a-log]\",\"callsign\":\"S57MS\",\"associationCode\":\"S5\",\"summitCode\":\"BR-008\",\"activatorCallsign\":\"S57MS/P\",\"activatorName\":\"Marko\",\"frequency\":\"28.380\",\"mode\":\"ssb\",\"summitDetails\":\"Lonica, 1124m, 4 pts\",\"highlightColor\":\"red\"},{\"id\":969363,\"userID\":0,\"timeStamp\":\"2024-01-11T14:16:27.38\",\"comments\":null,\"callsign\":\"SQ9OZM\",\"associationCode\":\"SP\",\"summitCode\":\"BZ-080\",\"activatorCallsign\":\"3Z7Z/P\",\"activatorName\":\"Not recognised\",\"frequency\":\"28.0485\",\"mode\":\"CW\",\"summitDetails\":\"Wierzbanowska Góra, 778m, 4 pts\",\"highlightColor\":\"red\"},{\"id\":969362,\"userID\":0,\"timeStamp\":\"2024-01-11T14:15:26.297\",\"comments\":\"Horst [VK port-a-log]\",\"callsign\":\"OE6STD\",\"associationCode\":\"OE\",\"summitCode\":\"ST-369\",\"activatorCallsign\":\"OE6STD/P\",\"activatorName\":\"Horst\",\"frequency\":\"14.290\",\"mode\":\"ssb\",\"summitDetails\":\"Haderniggkogel, 1184m, 4 pts\",\"highlightColor\":\"red\"},{\"id\":969361,\"userID\":0,\"timeStamp\":\"2024-01-11T14:14:02.183\",\"comments\":\"[RBNHole] at KM3T 20 WPM 30 dB SNR\",\"callsign\":\"RBNHOLE\",\"associationCode\":\"W1\",\"summitCode\":\"CR-006\",\"activatorCallsign\":\"N1ZF\",\"activatorName\":\"Paul\",\"frequency\":\"7.0640\",\"mode\":\"CW\",\"summitDetails\":\"Peaked Mountain, 373m, 1 pt\",\"highlightColor\":\"orange\"},{\"id\":969360,\"userID\":0,\"timeStamp\":\"2024-01-11T14:11:30.837\",\"comments\":null,\"callsign\":\"DM1DF\",\"associationCode\":\"DM\",\"summitCode\":\"BM-271\",\"activatorCallsign\":\"DM1DF/P\",\"activatorName\":\"Daniel\",\"frequency\":\"28.453\",\"mode\":\"SSB\",\"summitDetails\":\"Eschenberg, 1042m, 10 pts\",\"highlightColor\":\"orange\"},{\"id\":969359,\"userID\":0,\"timeStamp\":\"2024-01-11T14:11:07.227\",\"comments\":\"[RBNHole] at K1RA 20 WPM 28 dB SNR\",\"callsign\":\"RBNHOLE\",\"associationCode\":\"W1\",\"summitCode\":\"CR-006\",\"activatorCallsign\":\"N1ZF\",\"activatorName\":\"Paul\",\"frequency\":\"14.0630\",\"mode\":\"CW\",\"summitDetails\":\"Peaked Mountain, 373m, 1 pt\",\"highlightColor\":\"orange\"},{\"id\":969358,\"userID\":0,\"timeStamp\":\"2024-01-11T14:10:40.457\",\"comments\":\"Few calls. Sunset\",\"callsign\":\"IN3NJB\",\"associationCode\":\"I\",\"summitCode\":\"LO-431\",\"activatorCallsign\":\"IN3NJB/P\",\"activatorName\":\"Roberto\",\"frequency\":\"7.019\",\"mode\":\"CW\",\"summitDetails\":\"Colma Alta, 712m, 1 pt\",\"highlightColor\":\"orange\"}]","payloadType":"json","x":130,"y":2540,"wires":[["9e7d538c37b4bcae"]]},{"id":"9e7d538c37b4bcae","type":"change","z":"d1395164b4eec73e","name":"LEDs off potentially","rules":[{"t":"set","p":"greenLedOff","pt":"flow","to":"true","tot":"bool"},{"t":"set","p":"yellowLedOff","pt":"flow","to":"true","tot":"bool"},{"t":"set","p":"redLedOff","pt":"flow","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":190,"y":2600,"wires":[["a059249fd9a72560"]]},{"id":"a059249fd9a72560","type":"split","z":"d1395164b4eec73e","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":410,"y":2600,"wires":[["6bdca1a1629ee363"]]},{"id":"6bdca1a1629ee363","type":"switch","z":"d1395164b4eec73e","name":"","property":"payload.associationCode","propertyType":"msg","rules":[{"t":"eq","v":"CT","vt":"str"}],"checkall":"true","repair":true,"outputs":1,"x":210,"y":2640,"wires":[["9d8057e31ab49074"]]},{"id":"9d8057e31ab49074","type":"function","z":"d1395164b4eec73e","name":"combined function","func":"let mode = msg.payload.mode;\n\nmsg.payload.mode = mode.toUpperCase();\n\n//if (msg.payload.mode == \"CW\") {\n//    delete msg.payload;\n//    return 0;\n//} else \nvar spotTime = (new Date(msg.payload.timeStamp));\n\n\nmsg.payload.spotHM = spotTime.getHours().toString() + \":\";\n\n//if (spotTime.getMinutes().toString().length == 1) {msg.payload.spotMM += \"0\"};\n\nmsg.payload.spotHM += spotTime.getMinutes().toString();\n\nlet s = msg.payload.timeStamp + 'Z';\n\nmsg.SOTAUTC = s;\n\nconst d = new Date(s);\nmsg.SOTAUTCmsec = d.getTime();\n\nmsg.spotAge = (global.get('timeNowInUTC') - d.getTime()) / (1000*60);\n\n// current time and spot time compare\n// if less than green/yellow boundary = green, \n// else if less than yellow/red boundary = yellow etc\n// LED colum = 0-99 number and its format is a traffic light\n\nlet ageInMin = Math.floor(msg.spotAge);\n\nif (ageInMin <= 5) {\n    // Green\n    flow.set('greenLedOff', false);\n    msg.payload.LED = \"95\";\n} else if (ageInMin <= 10) {\n    // Yellow\n    flow.set('yellowLedOff', false);\n    msg.payload.LED = \"40\";\n} else {\n    // red\n    flow.set('redLedOff', false);\n    msg.payload.LED = \"5\";\n} \n\n//msg.payload.LED = msg.payload.LED.toString();\n\nmsg.payload.ageInMin = ageInMin;\n\n\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":410,"y":2640,"wires":[["07f438a2621b922e"]]},{"id":"07f438a2621b922e","type":"join","z":"d1395164b4eec73e","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":610,"y":2640,"wires":[["2f978d94faed4ca6"]]},{"id":"2f978d94faed4ca6","type":"debug","z":"d1395164b4eec73e","name":"debug 2461","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":690,"y":2580,"wires":[]}]

p.s. Your flow json is corrupt as you have not posted it correctly.

In order to make code readable and usable it is necessary to surround your code with three backticks (also known as a left quote or backquote ```)

``` 
   code goes here 
```

You can edit and correct your post by clicking the pencil :pencil2: icon.

See this post for more details - How to share code or flow json

1 Like