# Printing the email body in watcher using nested array objects

**URL:** <https://discuss.elastic.co/t/printing-the-email-body-in-watcher-using-nested-array-objects/276919>\
**Category:** Kibana\
**Tags:** elastic-stack-alerting\
**Created:** [June 24, 2021, 11:18am UTC](https://discuss.elastic.co/t/printing-the-email-body-in-watcher-using-nested-array-objects/276919 "2021-06-24T11:18:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![venkatkumar229](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/venkatkumar229/32/104663_2.png) [@venkatkumar229](https://discuss.elastic.co/u/venkatkumar229)\
**Post date:** [June 24, 2021, 11:18am UTC](https://discuss.elastic.co/t/printing-the-email-body-in-watcher-using-nested-array-objects/276919/1 "2021-06-24T11:18:22Z")

</div>

Hi Team,

I am working on a watcher alert which will send an alert when the aggregated bucket count crossed certain value. I am getting aggregations output with nested array of objects and I want to print them line by line as a data table. Could you please let me know how can i print the data. I have tried to print the data using a list but that will not work as it will go to 1000s of lines and is not readable as I have 8 nested aggregations. Could you please let me how can go print the aggregated data as a data table in email body.

I have tried using the below docs for printing it as a list, is it possible to print the same as a table format tried using but no luck: [Watching event data | Elasticsearch Guide [7.2] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.2/watching-meetup-data.html)

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [June 29, 2021, 9:05am UTC](https://discuss.elastic.co/t/printing-the-email-body-in-watcher-using-nested-array-objects/276919/2 "2021-06-29T09:05:05Z")

</div>

Please share what you tried, so that we can go from there.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 27, 2021, 9:05am UTC](https://discuss.elastic.co/t/printing-the-email-body-in-watcher-using-nested-array-objects/276919/3 "2021-07-27T09:05:29Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
