Failed to map 'array': Function 'map' finished with error! Cannot read properties of null (reading '')

Hi,

My scenario only works on row 2 data set in Google sheet. The errors appears in the iterator module when processing any subsequent rows.

It doesn’t matter if I move any later rows, nor copy/paste the contents of any of it to row 2, I get the same error. I don’t think its not a content problem.

Make DevTool but it doens’t say anything. Also, there isn’t any thread nor existing solutions in the community about this.

I want to keep everything in Google sheets as much as possible.

Send help.

Thanks!

Hi @Roland_Amaranto_II

The map()function needs a key to properly return the elements you want in the resulting array.

From what I can see, you are building an array of simple strings. As such, why do you even need the map()function? Map is useful for extracting values from complex objects.

Also, get rid of the emptystring as the second parameter of remove(), as it won’t match empty values in the array. Just leave it blank.

@damato

1 Like

Thanks for the reply @damato

Yesterday, I changed the layout of the Google Sheet tracker, the data format that’s fed to the scenario, and used the split() function instead.

Its working now and much simplified too.

Thanks again :handshake:

2 Likes