Get field names in "flat" format

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
......

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.

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