# How to define dynamic\_template for an json type data?

**URL:** <https://discuss.elastic.co/t/how-to-define-dynamic-template-for-an-json-type-data/234414>\
**Category:** Elasticsearch\
**Created:** [May 26, 2020, 8:14pm UTC](https://discuss.elastic.co/t/how-to-define-dynamic-template-for-an-json-type-data/234414 "2020-05-26T20:14:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rishabh\_jain](https://avatars.discourse-cdn.com/v4/letter/r/aeb1de/32.png) [@rishabh\_jain](https://discuss.elastic.co/u/rishabh_jain)\
**Post date:** [May 26, 2020, 8:14pm UTC](https://discuss.elastic.co/t/how-to-define-dynamic-template-for-an-json-type-data/234414/1 "2020-05-26T20:14:30Z")

</div>

Consider the example:  
{  
"id":"abcd",  
"name":"xyz",  
"extra\_details":{  
"a":1,  
"b":2  
}  
}

Need to define dynamic template for the extra\_details type data ??  
How can i define this?

---

<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 23, 2020, 8:14pm UTC](https://discuss.elastic.co/t/how-to-define-dynamic-template-for-an-json-type-data/234414/2 "2020-06-23T20:14:31Z")

</div>

Closed on June 23, 2020, 8:14pm UTC

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