# Decode JSON Nested Objects

**URL:** <https://forum.elixirforum.com/t/decode-json-nested-objects/34157>\
**Category:** Questions\
**Tags:** phoenix, json, poison\
**Created:** [September 3, 2020, 7:37pm UTC](https://forum.elixirforum.com/t/decode-json-nested-objects/34157 "2020-09-03T19:37:59Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![zzq](https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/z/49beb7/32.png) [@zzq](https://forum.elixirforum.com/u/zzq)\
**Post date:** [September 8, 2020, 1:01pm UTC](https://forum.elixirforum.com/t/decode-json-nested-objects/34157/6 "2020-09-08T13:01:25Z")

</div>

The square bracket syntax in the `:as` option indicates a list (which makes sense, because that’s what square brackets are in Elixir.) So it makes sense to have them around `%CurrentlyReprModule.CurrentlyBlock{}`, because the `"currently_collection"` key is indeed supposed to have a list of those objects. But I’m pretty sure you don’t want that around `%CurrentlyReprModule.Page{}`, because there is only supposed to be a single `"page"` object (not a list of them.)

---

_[View the full topic](https://forum.elixirforum.com/t/decode-json-nested-objects/34157)._
