Payload decoder on V3 stack

I have problems with my payload decoder on the new V3 stack:
This is what the device encodes:

static uint8_t dataTX[2];
void build_data() {
dataTX[0] = tempC;
dataTX[1] = moisture;
}

This is what worked to decode the payload on the V2 stack:

function decoder(input, port) {
var temp = parseInt(input[0]);
var moisture = parseInt(input[1]);
return { temperature: temp,
humidity: moisture };
}

On the V3 stack it is not working anymore.
Can you point me in the right direction
Thanks, Kees

Searching for ‘V3 documentation’ leads you to: Where to find the V3 documentation?

In the V3 documentation search for ‘payload’.
Payload Formatters is listed on the Integrations page.

Some things have changed e.g. instead of of bytes and port now use input.bytes and input.fPort. See documentation for more changes.

IIRC existing V2 payload functions should also work in V3 for backwards compatibility but I have not tested that.

Next time please do some searching yourself first.

FYI, also see About the V2 to V3 Upgrade category

Thanks.
I read the docs but missed this specific information