# Select fields from nested preload query

**URL:** <https://forum.elixirforum.com/t/select-fields-from-nested-preload-query/47494>\
**Category:** Questions\
**Tags:** ecto, phoenix\
**Created:** [April 29, 2022, 6:01am UTC](https://forum.elixirforum.com/t/select-fields-from-nested-preload-query/47494 "2022-04-29T06:01:54Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![seanyutah](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/seanyutah/32/23703_2.png) [@seanyutah](https://forum.elixirforum.com/u/seanyutah)\
**Post date:** [April 30, 2022, 2:39am UTC](https://forum.elixirforum.com/t/select-fields-from-nested-preload-query/47494/7 "2022-04-30T02:39:22Z")

</div>

Your code outputs the same ecto structure as mine in that the top-level comments have children preloaded and the nested comments do not . Like I said, the ecto output isn’t the problem. The issue I’m wondering about is converting the ecto structs to maps (and then json) without having to map over the top level and nested lists.

---

_[View the full topic](https://forum.elixirforum.com/t/select-fields-from-nested-preload-query/47494)._
