# \#nil

**URL:** https://forum.elixirforum.com/tag/nil/2757.md

[Latest](https://forum.elixirforum.com/latest.md) · [Categories](https://forum.elixirforum.com/categories.md) · [Tags](https://forum.elixirforum.com/tags.md)

---

## [How to ignore nil values in response in Phoenix](https://forum.elixirforum.com/t/how-to-ignore-nil-values-in-response-in-phoenix/51619)

<div class="topic-metadata">

**Author:** [@ddoronin](https://forum.elixirforum.com/u/ddoronin)\
**Replies:** 1\
**Last updated:** [November 7, 2022, 2:33pm UTC](https://forum.elixirforum.com/t/how-to-ignore-nil-values-in-response-in-phoenix/51619 "2022-11-07T14:33:41Z")

</div>

Hey folks! I have a web service in Phoenix that returns responses in JSON format. I want Phoenix to ignore nil values in the JSON response and return only fields populated with data. This problem looks so common. Is ther…

---

## [\`nil\` or empty list?](https://forum.elixirforum.com/t/nil-or-empty-list/44778)

<div class="topic-metadata">

**Author:** [@Euphorichuman](https://forum.elixirforum.com/u/Euphorichuman)\
**Replies:** 4\
**Last updated:** [December 23, 2021, 2:33am UTC](https://forum.elixirforum.com/t/nil-or-empty-list/44778 "2021-12-23T02:33:34Z")

</div>

I’m managing my Postgres database with Ecto and I have come across a situation: In some of the fields for some of my records, I save empty values: For this case, it would be an empty list \[\]. Empty list or nil, which is…

---

## [NIL and true/false](https://forum.elixirforum.com/t/nil-and-true-false/38486)

<div class="topic-metadata">

**Author:** [@akshayde85](https://forum.elixirforum.com/u/akshayde85)\
**Replies:** 7\
**Last updated:** [March 27, 2021, 6:37am UTC](https://forum.elixirforum.com/t/nil-and-true-false/38486 "2021-03-27T06:37:39Z")

</div>

Hello All, While comparing NIL vs true/false value, why elixir gives different results when one performs NIL and false operation? Please see below o/p from iex terminal .. iex\>\> nil && true nil iex\>\> true && nil nil …
