JSON with Loop

JSON with Loop

Hi, I have below response from ElasticSearch. URL which i typed in was  http://localhost:9200/dummytest/_search?pretty

{
  • "took"0,
  • "timed_out"false,
  • "_shards": {
    • "total"1,
    • "successful"1,
    • "skipped"0,
    • "failed"0
    },
  • "hits": {
    • "total"10,
    • "max_score"1,
    • "hits": [
      • {
        • "_index""dummytest",
        • "_type""testusers",
        • "_id""1",
        • "_score"1,
        • "_source": {
          • "ndex"1,
          • "firstnamename""KC",
          • "lastname""Park"
          }
        }
      • ,
      • {
        • "_index""dummytest",
        • "_type""testusers",
        • "_id""2",
        • "_score"1,
        • "_source": {
          • "ndex"2,
          • "firstnamename""Dale",
          • "lastname""Chipchase"
          }
        }
  • Step 1- I need to construct JSON request that takes the value of "_index" and put it in loop to check all the index occurence.Please tell me how do i do that.
  • Step2 - I have a requirement to check the index name and get the status code from Database for that index. How do we do it JSON/JavaScript.