I have created a index using kibana console
the sample JSON data format -
[{
"id":1,
"Data":"{'patient_name':'Amey','gender':'Male'}",
"added_on":"2021-09-28 17:58:16",
"added_by":0,
"status":1
},
{
"id":2,
"Data":"{'patient_name':'Shubham','gender':'Male'}",
"added_on":"2021-09-28 17:58:16",
"added_by":0,
"status":1
},
{
"id":3,
"Data":"{'patient_name':'Ritika','gender':'female'}",
"added_on":"2021-09-28 17:58:16",
"added_by":0,
"status":1
},
{
"id":4,
"Data":"{'patient_name':'Neha','gender':'female'}",
"added_on":"2021-09-28 17:58:16",
"added_by":0,
"status":1
}]
indexed data look like this
the data is in JSON format in which
Data (field) have two fields inside it as patient name and gender
I want to get count of gender by using the gender field from Data
which will show the results like this
Is there any way to do this in ES?