# Access key value from data

**URL:** <https://discourse.gohugo.io/t/access-key-value-from-data/16015>\
**Category:** support\
**Created:** [December 27, 2018, 3:10pm UTC](https://discourse.gohugo.io/t/access-key-value-from-data/16015 "2018-12-27T15:10:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Weru](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/weru/32/7300_2.png) [@Weru](https://discourse.gohugo.io/u/Weru)\
**Post date:** [December 27, 2018, 3:10pm UTC](https://discourse.gohugo.io/t/access-key-value-from-data/16015/1 "2018-12-27T15:10:21Z")

</div>

I have the following data in a yaml file.

```auto
details:
  location: Amsterdam
  rate: 50 
  openHours: 9.00 A.M - 3.00 P.M
  site: certs.nl
  available: true

```

I would like to range over this data and print both the key and value of each item, like so:

```auto
{{ range .Site.Data.store }}
  <div class = "detail">
    <div class = "detail_title">{{ key }}</div><div class = "detail_key">{{ value }}</div>
  </div>
{{ end }}

```

Is this possible in Hugo? Or must I refactor my data?

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [December 27, 2018, 3:19pm UTC](https://discourse.gohugo.io/t/access-key-value-from-data/16015/2 "2018-12-27T15:19:22Z")

</div>

> [@Weru](#):
>
> {{ range .Site.Data.store }}

{{ range $key, $value := .Site.Data.store }}

---

<div class="post-metadata">

**Author:** ![Weru](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/weru/32/7300_2.png) [@Weru](https://discourse.gohugo.io/u/Weru)\
**Post date:** [December 27, 2018, 3:58pm UTC](https://discourse.gohugo.io/t/access-key-value-from-data/16015/3 "2018-12-27T15:58:42Z")

</div>

@bep Thanks
