# Get field names in "flat" format

**URL:** <https://discuss.elastic.co/t/get-field-names-in-flat-format/39877>\
**Category:** Kibana\
**Created:** [January 22, 2016, 12:48pm UTC](https://discuss.elastic.co/t/get-field-names-in-flat-format/39877 "2016-01-22T12:48:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Benjamin\_Gathmann](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benjamin_gathmann/32/7561_2.png) [@Benjamin\_Gathmann](https://discuss.elastic.co/u/Benjamin_Gathmann)\
**Post date:** [January 22, 2016, 12:48pm UTC](https://discuss.elastic.co/t/get-field-names-in-flat-format/39877/1 "2016-01-22T12:48:41Z")

</div>

Is there a possibility to get the leaf field names in the mappings from an ES index in a flat format?  
E.g.

```
"message.author.firstname" : { properties... }

```

instead of {"message": { "author" : { "firstname" (very simplified)

Essentially, I want to build a view similar to that in Kibana Settings that gives an overview of the fields and their properties in an index:

```
name type format ....
message.author.firstname string
message.author.lastname string
......
```

---

<div class="post-metadata">

**Author:** ![Joe\_Fleming](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_fleming/32/3561_2.png) [@Joe\_Fleming](https://discuss.elastic.co/u/Joe_Fleming)\
**Post date:** [January 22, 2016, 5:33pm UTC](https://discuss.elastic.co/t/get-field-names-in-flat-format/39877/2 "2016-01-22T17:33:50Z")

</div>

If I understand correctly, you would like that flattened output directly from Elasticsearch?

The flattening happens via some custom output code in Kibana. If you were building something as a Kibana plugin, you could re-use that code, otherwise you'd have to provide you own custom flattening code for your use case.

It's possible I'm wrong and you actually _can_ do this in ES proper and I just don't know about it. You might try asking this question in the [Elasticsearch section](https://discuss.elastic.co/c/elasticsearch).

---

<div class="post-metadata">

**Author:** ![Benjamin\_Gathmann](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benjamin_gathmann/32/7561_2.png) [@Benjamin\_Gathmann](https://discuss.elastic.co/u/Benjamin_Gathmann)\
**Post date:** [January 25, 2016, 8:12am UTC](https://discuss.elastic.co/t/get-field-names-in-flat-format/39877/3 "2016-01-25T08:12:49Z")

</div>

Thanks for the reply. There is no ES method for this, so I will have to build my own method.

---

<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, 2:04pm UTC](https://discuss.elastic.co/t/get-field-names-in-flat-format/39877/4 "2017-07-06T14:04:19Z")

</div>


