add method to get json from elastic search