parse JSON response from ElasticSearch