# Remove empty entries from html extract

**URL:** <https://community.n8n.io/t/remove-empty-entries-from-html-extract/4923>\
**Category:** Questions\
**Created:** [March 23, 2021, 9:50pm UTC](https://community.n8n.io/t/remove-empty-entries-from-html-extract/4923 "2021-03-23T21:50:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan\_English](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jonathan_english/32/3935_2.png) [@Jonathan\_English](https://community.n8n.io/u/Jonathan_English)\
**Post date:** [March 23, 2021, 9:50pm UTC](https://community.n8n.io/t/remove-empty-entries-from-html-extract/4923/1 "2021-03-23T21:50:25Z")

</div>

Hi!

I’ve got some empty entries (attachted picture red boxes) from my html extract, which I would like to remove. I tried an **IF** statement with **string** an **null** / **NULL** , but this doesn’t work.

> **[remove-empty-entries hosted at ImgBB](https://ibb.co/6BXtRcs)**
>
> Image remove-empty-entries hosted on ImgBB

How can i remove this entries? Thank you!

Greetings

---

<div class="post-metadata">

**Author:** ![ivov](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ivov/32/1463_2.png) [@ivov](https://community.n8n.io/u/ivov)\
**Post date:** [March 23, 2021, 10:36pm UTC](https://community.n8n.io/t/remove-empty-entries-from-html-extract/4923/2 "2021-03-23T22:36:27Z")

</div>

You can filter them out with a Function node:

```auto
return items.filter(i => i.json.title);

```

---

<div class="post-metadata">

**Author:** ![jan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jan/32/9_2.png) [@jan](https://community.n8n.io/u/jan)\
**Post date:** [March 23, 2021, 10:56pm UTC](https://community.n8n.io/t/remove-empty-entries-from-html-extract/4923/3 "2021-03-23T22:56:29Z")

</div>

Should additionally also work totally fine with the IF-Node and “String → Is Empty”.

`null / NULL` will not work as title it is an empty string so `""` and `null !== ""`.

---

<div class="post-metadata">

**Author:** ![Gabriele\_Bracciali](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/gabriele_bracciali/32/31293_2.png) [@Gabriele\_Bracciali](https://community.n8n.io/u/Gabriele_Bracciali)\
**Post date:** [November 21, 2022, 3:50pm UTC](https://community.n8n.io/t/remove-empty-entries-from-html-extract/4923/4 "2022-11-21T15:50:59Z")

</div>

Hey, i am jumping in this topic after the update of function node.  
hello, i’ve tried that but with the new code Node it doesn’t work.  
anyone have an update?

---

<div class="post-metadata">

**Author:** ![ivov](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ivov/32/1463_2.png) [@ivov](https://community.n8n.io/u/ivov)\
**Post date:** [November 21, 2022, 4:11pm UTC](https://community.n8n.io/t/remove-empty-entries-from-html-extract/4923/5 "2022-11-21T16:11:26Z")

</div>

Both `return items.filter(i => i.json.title);` and `return $input.all().filter(i => i.json.title);` should work on the Code node. `items` requires min 0.202.0.

---

<div class="post-metadata">

**Author:** ![Gabriele\_Bracciali](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/gabriele_bracciali/32/31293_2.png) [@Gabriele\_Bracciali](https://community.n8n.io/u/Gabriele_Bracciali)\
**Post date:** [November 21, 2022, 4:21pm UTC](https://community.n8n.io/t/remove-empty-entries-from-html-extract/4923/6 "2022-11-21T16:21:24Z")

</div>

With which value i should replace title?
