Thanks again - I've made leaps and bounds worth of progress since this morning, but hit a stumbling block with a particular individual - can't figure out why for this one individual my functions aren't working and are instead just dumping the entire payload?
[{"id":"e439a48a.6dfef8","type":"inject","z":"66862370.3ad20c","name":"","topic":"","payload":"{\"status\":1,\"data\":[{\"employee_id\":\"4157152\",\"employee_eid\":\"\",\"employee_name\":\"Todd\",\"employee_avatar\":\"0\",\"employee_avatar_url\":\"{\\\"large\\\":\\\"avatars\\\\/large_4157152-.jpg\\\",\\\"small\\\":\\\"avatars\\\\/small_4157152-41571521574718514.jpg\\\",\\\"bigger\\\":\\\"avatars\\\\/bigger_4157152-41571521574718514.jpg\\\",\\\"full\\\":\\\"avatars\\\\/full_4157152-41571521574718514.jpg\\\",\\\"profile\\\":\\\"avatars\\\\/profile_4157152-41571521574718514.jpg\\\",\\\"forum\\\":\\\"avatars\\\\/forum_4157152-41571521574718514.jpg\\\"}\",\"employee_avatar_url_small\":\"xxx\",\"schedule_id\":\"126235\",\"schedule_name\":\"Assistant\",\"schedule_color\":\"1\",\"timeclock_id\":\"154423384\",\"clockin_time\":{\"id\":4328,\"month\":3,\"day\":5,\"wday\":5,\"year\":2021,\"weekday\":\"Fri\",\"mname\":\"Mar\",\"week\":9,\"dayid\":6,\"timeid\":37,\"timeid_exact\":36,\"formatted\":\"Mar 5, 2021\",\"iso8601\":\"2021-03-05T08:56:40+0000\",\"time\":\"08:56\",\"timestamp\":1614934600,\"hours\":8,\"minutes\":56,\"seconds\":40,\"date\":\"Mar 5, 2021\",\"day_of_year\":\"63\",\"week_adjusted\":9,\"sp_wday\":6,\"date_timestamp\":\"2021-03-05 08:56:40\"},\"shift_id\":\"762556286\",\"shift_start\":{\"id\":4328,\"month\":3,\"day\":5,\"wday\":5,\"year\":2021,\"weekday\":\"Fri\",\"mname\":\"Mar\",\"week\":9,\"dayid\":6,\"timeid\":37,\"timeid_exact\":37,\"formatted\":\"Mar 5, 2021\",\"iso8601\":\"2021-03-05T09:00:00+0000\",\"time\":\"09:00\",\"timestamp\":1614934800,\"hours\":9,\"minutes\":0,\"seconds\":0,\"date\":\"Mar 5, 2021\",\"day_of_year\":\"63\",\"week_adjusted\":9,\"sp_wday\":6,\"date_timestamp\":\"2021-03-05 09:00:00\"},\"shift_end\":{\"id\":4328,\"month\":3,\"day\":5,\"wday\":5,\"year\":2021,\"weekday\":\"Fri\",\"mname\":\"Mar\",\"week\":9,\"dayid\":6,\"timeid\":51,\"timeid_exact\":51,\"formatted\":\"Mar 5, 2021\",\"iso8601\":\"2021-03-05T12:30:00+0000\",\"time\":\"12:30\",\"timestamp\":1614947400,\"hours\":12,\"minutes\":30,\"seconds\":0,\"date\":\"Mar 5, 2021\",\"day_of_year\":\"63\",\"week_adjusted\":9,\"sp_wday\":6,\"date_timestamp\":\"2021-03-05 12:30:00\"},\"is_on_break\":null,\"break\":[]}],\"metadata\":[],\"token\":\"xxx\",\"error\":null}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":90,"y":200,"wires":[["cdd7229f.03f11"]]},{"id":"cdd7229f.03f11","type":"function","z":"66862370.3ad20c","name":"","func":"msg.payload.todd = msg.payload.data.find(e => e.employee_id == \"4157152\");\nreturn msg;","outputs":1,"noerr":0,"x":230,"y":200,"wires":[["583d7ae4.4f92e4"]]},{"id":"583d7ae4.4f92e4","type":"function","z":"66862370.3ad20c","name":"todd","func":"msg.payload = msg.payload.todd;\nmsg.payload.name = msg.payload.employee_name;\nreturn msg;","outputs":1,"noerr":0,"x":390,"y":200,"wires":[["ad82d671.2406f8"]]},{"id":"ad82d671.2406f8","type":"function","z":"66862370.3ad20c","name":"","func":"const shiftstart = msg.payload.shift_start.timestamp;\nconst clockin = msg.payload.clockin_time.timestamp;\nconst timeDifference = shiftstart - clockin;\nconst timeDifference2 = clockin - shiftstart;\n if ((timeDifference/60).toFixed(0) > 3){\n msg.payload = msg.payload.name +\" \" + (timeDifference/60).toFixed(0) + \" early \";\n } else if ((timeDifference/60).toFixed(0) < 3){\n msg.payload = msg.payload.name +\" \" + (timeDifference2/60).toFixed(0) + \" late \";\n }\n\nreturn msg;\n\n\n\n \n//const shiftstart = msg.payload.shift_start.timestamp;\n//const clockin = msg.payload.clockin_time.timestamp;\n//const timeDifference = shiftstart - clockin;\n//msg.payload = \" \" + (timeDifference/60).toFixed(0) + \" early \";\n//return msg; ","outputs":1,"noerr":0,"x":530,"y":200,"wires":[["302b798b.f93456"]]},{"id":"302b798b.f93456","type":"debug","z":"66862370.3ad20c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":690,"y":200,"wires":[]}]
many thanks if anyone has time to take a look!