That’s what it’s doing.
[{"id":"606c2a396ac809de","type":"inject","z":"91a80f99.6180e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"value\":5},{\"value\":4},{\"value\":3},{\"value\":2},{\"value\":1}]","payloadType":"json","x":202,"y":4384,"wires":[["e27336b68d363182"]]},{"id":"4d3400143c8247b0","type":"debug","z":"91a80f99.6180e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":586,"y":4384,"wires":[]},{"id":"e27336b68d363182","type":"function","z":"91a80f99.6180e","name":"","func":"msg.payload = msg.payload.reduce((a, b) => a + b.value, 0) / msg.payload.length;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":380,"y":4384,"wires":[["4d3400143c8247b0"]]}]