# Mapping problem for dinamic array

**URL:** <https://discuss.elastic.co/t/mapping-problem-for-dinamic-array/35657>\
**Category:** Elasticsearch\
**Created:** [November 26, 2015, 11:29am UTC](https://discuss.elastic.co/t/mapping-problem-for-dinamic-array/35657 "2015-11-26T11:29:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cirot87](https://avatars.discourse-cdn.com/v4/letter/c/b782af/32.png) [@cirot87](https://discuss.elastic.co/u/cirot87)\
**Post date:** [November 26, 2015, 11:29am UTC](https://discuss.elastic.co/t/mapping-problem-for-dinamic-array/35657/1 "2015-11-26T11:29:32Z")

</div>

Hi, i need to create a mapping for one field that is an array of array.

example:

i want to save into ES 2.0 this array:

fruit : { yellow : { name:{},state:{} }, green : { name{},state() } }

but this array is dinamically created; so i don't know what i save into fruit (i don't know the color).

How i can set the mapping for this array?

---

<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 5, 2017, 11:35pm UTC](https://discuss.elastic.co/t/mapping-problem-for-dinamic-array/35657/2 "2017-07-05T23:35:39Z")

</div>


