# Problem access to value of some data

**URL:** <https://discuss.elastic.co/t/problem-access-to-value-of-some-data/86943>\
**Category:** Logstash\
**Created:** [May 24, 2017, 10:24am UTC](https://discuss.elastic.co/t/problem-access-to-value-of-some-data/86943 "2017-05-24T10:24:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gudo](https://avatars.discourse-cdn.com/v4/letter/g/aca169/32.png) [@Gudo](https://discuss.elastic.co/u/Gudo)\
**Post date:** [May 24, 2017, 10:24am UTC](https://discuss.elastic.co/t/problem-access-to-value-of-some-data/86943/1 "2017-05-24T10:24:46Z")

</div>

Hello everyone!  
i have problem to access some date  
my output is like that:  
"alternance" =\> [  
[0] {  
"country" =\> "value"  
}

i made alter filter and also mutate to access value but what i see is: "field" =\> "%{[alternance][country]}"  
and what i want is "field" =\> "value"

Thanks

---

<div class="post-metadata">

**Author:** ![Gudo](https://avatars.discourse-cdn.com/v4/letter/g/aca169/32.png) [@Gudo](https://discuss.elastic.co/u/Gudo)\
**Post date:** [May 24, 2017, 12:08pm UTC](https://discuss.elastic.co/t/problem-access-to-value-of-some-data/86943/2 "2017-05-24T12:08:04Z")

</div>

up 🙂

---

<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:** [May 28, 2017, 6:55pm UTC](https://discuss.elastic.co/t/problem-access-to-value-of-some-data/86943/3 "2017-05-28T18:55:19Z")

</div>

`alternance` contains an array of hashes. Use `%{[alternance][0][country]}` to extract the `country` subfield of the first array item.

---

<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:** [June 25, 2017, 6:55pm UTC](https://discuss.elastic.co/t/problem-access-to-value-of-some-data/86943/4 "2017-06-25T18:55:24Z")

</div>

Closed on June 25, 2017, 6:55pm UTC

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