# Inserting JArray data into Elastic in C#

**URL:** <https://discuss.elastic.co/t/inserting-jarray-data-into-elastic-in-c/211463>\
**Category:** Elasticsearch\
**Created:** [December 11, 2019, 12:16pm UTC](https://discuss.elastic.co/t/inserting-jarray-data-into-elastic-in-c/211463 "2019-12-11T12:16:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ayyappa\_P](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ayyappa_p/32/59015_2.png) [@Ayyappa\_P](https://discuss.elastic.co/u/Ayyappa_P)\
**Post date:** [December 11, 2019, 12:16pm UTC](https://discuss.elastic.co/t/inserting-jarray-data-into-elastic-in-c/211463/1 "2019-12-11T12:16:58Z")

</div>

Hi,

I have different JSON Array types, which have Unique JObject types. The structure is like the following.

```
"Fruit": [
      {
        "Name": "Mango",
        "Color": "Yellow",
        "Size": "Large"
      },
      {
        "Name": "Grape",
        "Color": "Black",
        "Size": "Small"
      },
      {
        "Name": "Banana",
        "Color": "Yellow",
        "Size": "Medium"
      }
    ],
    "Vehicle": [
      {
        "Name": "Hurricane",
        "Company": "Lamborgini",
        "Wheels": "4"
      },
      {
        "Name": "Ninja",
        "Company": "Kawasaki",
        "Wheels": "2"
      }
    ]

```

Now I want to insert the data either in any of these objects type, or a new object type.  
How to do this in .Net with NEST 7.4.1 version. I can't create strongly typed objects, because I pass them dynamically. I could give custom mapping in previous NEST Version(5.5.0) , But how can I give custom mapping in NEST 7.4.1. And one more doubt. Is 7.4.1 version has faster data inserts than 5.5.0 ? Please let me know. And for Querying the data, can I form Queries Dynamically and pass it to one place?

---

<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:** [January 8, 2020, 12:16pm UTC](https://discuss.elastic.co/t/inserting-jarray-data-into-elastic-in-c/211463/2 "2020-01-08T12:16:58Z")

</div>

Closed on January 8, 2020, 12:16pm UTC

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