# How to Parse Response from Elastic Search to Java Objects (Map)?

**URL:** <https://discuss.elastic.co/t/how-to-parse-response-from-elastic-search-to-java-objects-map/15370>\
**Category:** Elasticsearch\
**Created:** [January 23, 2014, 2:03am UTC](https://discuss.elastic.co/t/how-to-parse-response-from-elastic-search-to-java-objects-map/15370 "2014-01-23T02:03:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rahul\_Kalra](https://avatars.discourse-cdn.com/v4/letter/r/a87d85/32.png) [@Rahul\_Kalra](https://discuss.elastic.co/u/Rahul_Kalra)\
**Post date:** [January 23, 2014, 2:03am UTC](https://discuss.elastic.co/t/how-to-parse-response-from-elastic-search-to-java-objects-map/15370/1 "2014-01-23T02:03:51Z")

</div>

Hi,

Please tell me how to convert the Response from Elastic Search to Java  
Object (Map)  
I want to get the values of user attributes under "\_source" like  
"lastName", "firstName", "Manager", "email"

## Here is the sample response from Elastic Search.

## { "took" : 45, "timed\_out" : false, "\_shards" : { "total" : 5, "successful" : 5, "failed" : 0 }, "hits" : { "total" : 24, "max\_score" : 1.0, "hits" : [{ "\_index" : "ldapdata4", "\_type" : "persons1", "\_id" : "295950", "\_score" : 1.0, "\_source" : {"lastName":"p nayak","firstName":"user1","Manager":"Anthony|Kraybill|3115617|anony@zigby.com","email":"user1.nayak@acs-adibirla.com"} }, { "\_index" : "ldapdata4", "\_type" : "persons1", "\_id" : "299193", "\_score" : 1.0, "\_source" : {"lastName":"singh","firstName":"user1","Manager":"Michael|Beckwith|347460924|mb4ecith@zigby.com","email":"user1.Singh1@acs.adibirla.com"} }] } }

Thanks !!

Regards,  
Rahul

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/709f8f6f-9b7e-42ed-a036-f61d9f7bc502%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/709f8f6f-9b7e-42ed-a036-f61d9f7bc502%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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 6, 2017, 1:55am UTC](https://discuss.elastic.co/t/how-to-parse-response-from-elastic-search-to-java-objects-map/15370/2 "2017-07-06T01:55:13Z")

</div>


