# How to Get formatted Source

**URL:** <https://discuss.elastic.co/t/how-to-get-formatted-source/111273>\
**Category:** Elasticsearch\
**Created:** [December 12, 2017, 8:43am UTC](https://discuss.elastic.co/t/how-to-get-formatted-source/111273 "2017-12-12T08:43:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aneesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aneesh/32/37819_2.png) [@aneesh](https://discuss.elastic.co/u/aneesh)\
**Post date:** [December 12, 2017, 8:43am UTC](https://discuss.elastic.co/t/how-to-get-formatted-source/111273/1 "2017-12-12T08:43:07Z")

</div>

I just want the actual data as array from ElasticSearch and not the meta related to that.  
Following is the my code. After getting the data from ES, I need to parse that and select the "\_source" from there.  
That way it eats up few millisecond before I actually get the usable data.

JArray arrHits = (JArray)JObject.Parse(objElasticResponse.Body.ToString())["hits"]["hits"];  
IEnumerable lstResponse = arrHits.Select(x =\> x["\_source"]);

---

<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 9, 2018, 8:43am UTC](https://discuss.elastic.co/t/how-to-get-formatted-source/111273/2 "2018-01-09T08:43:17Z")

</div>

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