# Using macros to explode a struct into a tuple of its members

**URL:** <https://discourse.julialang.org/t/using-macros-to-explode-a-struct-into-a-tuple-of-its-members/58997>\
**Category:** General Usage\
**Created:** [April 10, 2021, 5:36pm UTC](https://discourse.julialang.org/t/using-macros-to-explode-a-struct-into-a-tuple-of-its-members/58997 "2021-04-10T17:36:50Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [April 11, 2021, 12:25am UTC](https://discourse.julialang.org/t/using-macros-to-explode-a-struct-into-a-tuple-of-its-members/58997/7 "2021-04-11T00:25:22Z")

</div>

See also [this discourse thread](https://discourse.julialang.org/t/get-fieldnames-and-values-of-struct-as-namedtuple/8991), which discussed conversion to a `NamedTuple` and also recommended a generated function.

---

_[View the full topic](https://discourse.julialang.org/t/using-macros-to-explode-a-struct-into-a-tuple-of-its-members/58997)._
