How to filter out null elments from an array while setting up a variable

What are you trying to achieve?

Hey, I have an array of objects I want map that array so that i get aarray of desired property of tehe object i have successfully got that array of that proery but i want to remove null entries from it when i’m mapping can anyone tell me how to do it

Welcome to the Make community!

To do this, you can use the built-in function remove — “Removes values specified in the parameters of an array. Effective only in case of primitive arrays of text or numbers.”

{{ remove(array; value1; value2; ...) }}

e.g.: (paste this into the field)

{{ remove(1.array; null) }}

For more information, the function’s documentation can be found in the Help Centre. You should also complete the tutorials in the Make Academy.

Hope this helps! Let me know if there are any further questions or issues.

@samliew

thank you for your help it really worked but I have one more problem here

I have data in this format

“all created times”: [
[
{
“type”: “text”,
“text”: {
“content”: “April 28, 2025 5:11 PM”,
“link”: null
},
“annotations”: {
“bold”: false,
“italic”: false,
“strikethrough”: false,
“underline”: false,
“code”: false,
“color”: “default”
},
“plain_text”: “April 28, 2025 5:11 PM”,
“href”: null
}
],
[
{
“type”: “text”,
“text”: {
“content”: “April 28, 2025 12:27 PM”,
“link”: null
},
“annotations”: {
“bold”: false,
“italic”: false,
“strikethrough”: false,
“underline”: false,
“code”: false,
“color”: “default”
},
“plain_text”: “April 28, 2025 12:27 PM”,
“href”: null
}
],
[
{
“type”: “text”,
“text”: {
“content”: “April 28, 2025 12:10 PM”,
“link”: null
},
“annotations”: {
“bold”: false,
“italic”: false,
“strikethrough”: false,
“underline”: false,
“code”: false,
“color”: “default”
},
“plain_text”: “April 28, 2025 12:10 PM”,
“href”: null
}
],
[

i have an array of arrays of objects

as you can see in the format i want variable that is array of plain texts fetched out of array

can you help me with this

No problem, glad I could help you solve “How to filter out null elments from an array while setting up a variable”.

1. If anyone has a new question in the future, please start a new thread. This makes it easier for others with the same problem to search for the answers to specific questions, and you are more likely to receive help since newer questions are monitored closely.

2. The Make Community guidelines encourages users to try to mark helpful replies as solutions to help keep the Community organized.

This marks the topic as solved, so that:

  • others can save time when catching up with the latest activity here, and
  • allows others to quickly jump to the solution if they come across the same problem

To do this, simply click the checkbox at the bottom of the post that answers your question:
Screenshot_2023-10-04_161049

3. Don’t forget to like and bookmark this topic so you can get back to it easily in future!

Hope this helps! Let me know if there are any further questions or issues.

@samliew

1 Like