Skip or remove empty items

Hi all,

this is my first question. So, I got output from an API. I just want to handover the 5 URLs.

From the API-output I extract the URLs under the “organic” section.
But sometimes these “url”-items are empty in the array.
So this could be the first, or third and so on. But I just want to “skip” these empty items. I just want the first 5 URL to handover to the next iterator-module.

I tried a filter with “exist”, then the remove-function combined with the map-function you see in the screenshot. But nothing helps.

Screenshot of the set variable-module and the output of the API are attached.

How do I do this?
api-output.txt (19.2 KB)

Thorsten

Since it’s a bit odd to try and find out why it picks up the empty entry, you can just wrap the map function inside a remove( ):
image

1 Like

I thank you so much. That did the trick. Great! 2 general questions.

Do you know a better resource? The help section of make explains the functions and other stuff with less text. I am looking forward to getting a different examples of the functions. Explained or at least better described.

Are you using an AI like ChatGPT to build solutions faster? My results with ChatGPT are not satisfiying.

I don’t use any GPT for Make unless it’s for custom functions (an enterprise feature, in javascript) or to help with calculating something more efficiently. A lot of functions in Make are javascript, so sometimes the documentation out there for javascript functions can help.

2 Likes