I have two arrays with three objects each.(this three may change to any number, but will always be equal numbers). i want to join these arrays into one array, but the objects should be merged with a condition of date being equal (the data is cleansed and they are unique records, no duplicate dates).
I am unable to get it going. Eventually I need to calculate OEE, with mulitplying the respective date's uptime with speed for the day, and get the target and later do rest of the calculation.
[{"id":"54ac643a30582248","type":"group","z":"ffc4fcc1699193f0","style":{"stroke":"#999999","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["213d8c5915e8033d","3c25666c402d375e","7dc31930824f26be","b965fba69473527c","4550b71af69b8836","93feac8f6c4ce81e","bb872ecada3c6e6a"],"x":594,"y":3619,"w":852,"h":162},{"id":"213d8c5915e8033d","type":"inject","z":"ffc4fcc1699193f0","g":"54ac643a30582248","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":700,"y":3700,"wires":[["3c25666c402d375e","7dc31930824f26be"]]},{"id":"3c25666c402d375e","type":"change","z":"ffc4fcc1699193f0","g":"54ac643a30582248","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"[{\"Date\":\"01-02-2025, Sat\",\"Shift_A\":\"-\",\"Shift_B\":\"-\",\"Shift_C\":\"612\",\"Total_Day_F\":\"612\",\"Total_Day\":\"612\",\"UP\":15,\"DN\":1425,\"TOT\":1440,\"AVAIL\":\"1.04\"},{\"Date\":\"02-02-2025, Sun\",\"Shift_A\":\"18,134\",\"Shift_B\":\"45,234\",\"Shift_C\":\"50,440\",\"Total_Day_F\":\"113,808\",\"Total_Day\":\"113808\",\"UP\":1061,\"DN\":379,\"TOT\":1440,\"AVAIL\":\"73.68\"},{\"Date\":\"03-02-2025, Mon\",\"Shift_A\":\"47,537\",\"Shift_B\":\"44,625\",\"Shift_C\":\"45,811\",\"Total_Day_F\":\"137,973\",\"Total_Day\":\"137973\",\"UP\":1270,\"DN\":169,\"TOT\":1439,\"AVAIL\":\"88.26\"}]","tot":"json"},{"t":"set","p":"topic","pt":"msg","to":"availability","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":930,"y":3660,"wires":[["b965fba69473527c","93feac8f6c4ce81e"]]},{"id":"7dc31930824f26be","type":"change","z":"ffc4fcc1699193f0","g":"54ac643a30582248","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"[{\"Date\":\"01-02-2025, Sat\",\"Speed\":50,\"Occurs\":3},{\"Date\":\"02-02-2025, Sun\",\"Speed\":110,\"Occurs\":995},{\"Date\":\"03-02-2025, Mon\",\"Speed\":110,\"Occurs\":1214}]","tot":"json"},{"t":"set","p":"topic","pt":"msg","to":"speed","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":940,"y":3740,"wires":[["4550b71af69b8836","93feac8f6c4ce81e"]]},{"id":"b965fba69473527c","type":"debug","z":"ffc4fcc1699193f0","g":"54ac643a30582248","name":"debug 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1120,"y":3660,"wires":[]},{"id":"4550b71af69b8836","type":"debug","z":"ffc4fcc1699193f0","g":"54ac643a30582248","name":"debug 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1110,"y":3740,"wires":[]},{"id":"93feac8f6c4ce81e","type":"join","z":"ffc4fcc1699193f0","g":"54ac643a30582248","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":1170,"y":3700,"wires":[["bb872ecada3c6e6a"]]},{"id":"bb872ecada3c6e6a","type":"debug","z":"ffc4fcc1699193f0","g":"54ac643a30582248","name":"debug 3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1340,"y":3700,"wires":[]}]