# Mappings for .NET Dictionary of type Dictionary\<string, string\>()

**URL:** <https://discuss.elastic.co/t/mappings-for-net-dictionary-of-type-dictionary-string-string/356823>\
**Category:** Elastic Observability\
**Created:** [April 4, 2024, 10:18pm UTC](https://discuss.elastic.co/t/mappings-for-net-dictionary-of-type-dictionary-string-string/356823 "2024-04-04T22:18:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ksobon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ksobon/32/103774_2.png) [@ksobon](https://discuss.elastic.co/u/ksobon)\
**Post date:** [April 4, 2024, 10:18pm UTC](https://discuss.elastic.co/t/mappings-for-net-dictionary-of-type-dictionary-string-string/356823/1 "2024-04-04T22:18:49Z")

</div>

I have a .NET object type of `Dictionary<string, string> customData {get; set; }` Let's say it's a dictionary of some values like:

```auto
{
 "key1", "value1", 
 "key2", "value2"
}

```

if the .NET property name is "customData" it would map it to something like `customData.key1` and the value would be set to `value1`. By default that is auto mapped into `Text` type with a field `keyword`. Is there a way to map it so that the actual value of the dictionary entry is stored as Keyword? I want the `customData.key1` to hold a Keyword type value as opposed to it being Text with a backing field of Keyword type. I want to access the keyword field directly from `customData.key1` instead of `customData.key1.keyword`.

Trying to avoid using .keyword like this:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/b/7b8dba7bbba605f84ac62f6b1dd6e8b061bea262.png)

Ideas?

I tried this:

```auto
     "customData": {
          "type": "object",
          "properties": {
            "item": {
              "type": "keyword"
            },
            "keys": {
              "type": "object",
              "properties": {
                "count": {
                  "type": "integer"
                }
              }
            },
            "values": {
              "type": "object",
              "properties": {
                "count": {
                  "type": "integer"
                },
                "item": {
                  "type": "keyword"
                }
              }
            },
            "count": {
              "type": "integer"
            },
            "comparer": {
              "type": "object",
              "properties": {}
            }
          }
        }

```
