# Message - How can i access sub buckets

**URL:** <https://forum.opensearch.org/t/message-how-can-i-access-sub-buckets/1562>\
**Category:** Alerting\
**Created:** [September 19, 2019, 2:48pm UTC](https://forum.opensearch.org/t/message-how-can-i-access-sub-buckets/1562 "2019-09-19T14:48:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![asikarwar](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/asikarwar/32/286_2.png) [@asikarwar](https://forum.opensearch.org/u/asikarwar)\
**Post date:** [September 19, 2019, 2:48pm UTC](https://forum.opensearch.org/t/message-how-can-i-access-sub-buckets/1562/1 "2019-09-19T14:48:28Z")

</div>

How can i access **critical\_host \> buckets \> “doc\_count”**

 ![image](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/1X/fefb59138c55b5db2b2ba15a2d5aae2b0b3c269f.png)

I can access

> provider\_name.buckets  
> like this:

```
"providers":{
    {{#ctx.results.0.aggregations.provider_name.buckets}}
       "provider_name": "{{key}}",
       "Count": {{doc_count}}
    {{/ctx.results.0.aggregations.provider_name.buckets}}
    }

```

---

<div class="post-metadata">

**Author:** ![kris](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/kris/32/2208_2.png) [@kris](https://forum.opensearch.org/u/kris)\
**Post date:** [February 7, 2023, 5:17pm UTC](https://forum.opensearch.org/t/message-how-can-i-access-sub-buckets/1562/2 "2023-02-07T17:17:55Z")

</div>


