# Elasticsearch (NO log stash) - Keys starting with dot in JSON field

**URL:** <https://discuss.elastic.co/t/elasticsearch-no-log-stash-keys-starting-with-dot-in-json-field/307570>\
**Category:** Elasticsearch\
**Created:** [June 18, 2022, 3:50pm UTC](https://discuss.elastic.co/t/elasticsearch-no-log-stash-keys-starting-with-dot-in-json-field/307570 "2022-06-18T15:50:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![M2r12n0](https://avatars.discourse-cdn.com/v4/letter/m/ecd19e/32.png) [@M2r12n0](https://discuss.elastic.co/u/M2r12n0)\
**Post date:** [June 18, 2022, 3:50pm UTC](https://discuss.elastic.co/t/elasticsearch-no-log-stash-keys-starting-with-dot-in-json-field/307570/1 "2022-06-18T15:50:02Z")

</div>

Hi,

Sorry for bothering with this, but I can not resolve it yet.  
I need to ingest a JSON type field but some of the keys starts with dots, something like this:

{  
'.house.door' : 'nice',  
'.car.window' : 'blue'  
}

I tried take the whole json as a string but the upstream app needs to get a JSON when query.  
I tried to convert all keys to strings, but I am having an error of "failed to parse","caused\_by":{"type":"illegal\_argument\_exception","reason":"field name cannot contain only whitespace:"

I tried more things, but not important to note. I can not strip out the initial dot from the keys, the upstream app need it.

Any idea,  
Thank you, I appreciate.

M

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [June 19, 2022, 5:07am UTC](https://discuss.elastic.co/t/elasticsearch-no-log-stash-keys-starting-with-dot-in-json-field/307570/2 "2022-06-19T05:07:29Z")

</div>

Dot is used as a field separator in Elasticsearch so I believe you will need to restructure the documents in order to index them into Elasticsearch.

---

<div class="post-metadata">

**Author:** ![M2r12n0](https://avatars.discourse-cdn.com/v4/letter/m/ecd19e/32.png) [@M2r12n0](https://discuss.elastic.co/u/M2r12n0)\
**Post date:** [June 27, 2022, 1:35pm UTC](https://discuss.elastic.co/t/elasticsearch-no-log-stash-keys-starting-with-dot-in-json-field/307570/3 "2022-06-27T13:35:43Z")

</div>

Thank you Christian !  
I am fraid I have to dump my json.

---

<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 25, 2022, 1:35pm UTC](https://discuss.elastic.co/t/elasticsearch-no-log-stash-keys-starting-with-dot-in-json-field/307570/4 "2022-07-25T13:35:55Z")

</div>

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