# Accessing specific fields from tree structure

**URL:** <https://discuss.elastic.co/t/accessing-specific-fields-from-tree-structure/59297>\
**Category:** Logstash\
**Created:** [August 30, 2016, 11:19am UTC](https://discuss.elastic.co/t/accessing-specific-fields-from-tree-structure/59297 "2016-08-30T11:19:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Primeval](https://avatars.discourse-cdn.com/v4/letter/p/f6c823/32.png) [@Primeval](https://discuss.elastic.co/u/Primeval)\
**Post date:** [August 30, 2016, 11:19am UTC](https://discuss.elastic.co/t/accessing-specific-fields-from-tree-structure/59297/1 "2016-08-30T11:19:29Z")

</div>

I have dictionary in yaml that looks like this:

- A001:
  - {B001: {C001: 10s, C002: 15s}}
  - {B002: {C003: 20s, C004: 25s}}

i want to access specific value, for example when i have A001,B001,C001 in my logs i want to get "10s". I tried to use translate plugin but it only return value for A001. Is there a way in logstash to use tree structure for that ? (i know i can use if, but it will not be optimal in the future)

Thanks

---

<div class="post-metadata">

**Author:** ![Primeval](https://avatars.discourse-cdn.com/v4/letter/p/f6c823/32.png) [@Primeval](https://discuss.elastic.co/u/Primeval)\
**Post date:** [August 31, 2016, 4:53am UTC](https://discuss.elastic.co/t/accessing-specific-fields-from-tree-structure/59297/2 "2016-08-31T04:53:26Z")

</div>

Any ideas?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [August 31, 2016, 5:47am UTC](https://discuss.elastic.co/t/accessing-specific-fields-from-tree-structure/59297/3 "2016-08-31T05:47:38Z")

</div>

> i want to access specific value, for example when i have A001,B001,C001 in my logs i want to get "10s".

> **[Accessing event data and fields | Logstash Reference \[8.11\] | Elastic](https://www.elastic.co/guide/en/logstash/current/event-dependent-configuration.html#logstash-config-field-references)**

> Any ideas?

Jeez, have patience.

---

<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 6, 2017, 4:40am UTC](https://discuss.elastic.co/t/accessing-specific-fields-from-tree-structure/59297/4 "2017-07-06T04:40:41Z")

</div>

Closed on July 6, 2017, 4:40am UTC


