Process Elasticsearch JSON on the shell

Lets throw security out the window for a moment. Say we store user accounts with clear text passwords in Elasticsearch , what is the easiest way to use the results in a shell script? We can begin by creating two accounts, one for admin and one for john : # curl -XPUT localhost:9200/site/people/1?pretty=True -d ' {"name": "admin", "password": "secret", "admin": "true"} ' { "_index" : "site", "_type" : "people", "_id" : "1", "_version" : 1, "_shards" : { "total" : 2, "successful" : 1, "failed" : 0 }, "created" : true } # curl -XPUT localhost:9200/site/people/2?