$map Postman Flows - returning null

Hi all,

I was hoping to gauge if I’m using the $map function correctly in the evaluate block in Postman Flows.

Above is an image of the problem area in my flow. I’m attempting to $map two arrays with each other containing weather data. As you can see in the current, my “current” value is appearing as null, which is meant to be pulling data from value3, an array with the same number of values as the main array (value 1).

I’ve doublechecked everything I can possibly think of. As far as I can see the number of temperature, matches the number of main keys in the value1 array. So, I don’t think there is a mismatch of data.

Any ideas? Am I using the $map function wrong?

The $map function for reference:

$map(value1, fn($e, $index) {
    return {
        "city": $e.city,
        "forecast": $e.forecast

Disclaimer, quite new to FQL. Very hard to get my read around, but is happening slowly.

Case closed. I solved this by removing the “return”

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.