Hi,
I need get the sum of each item quantity? My data:
{
"took": 3,
"timed_out": false,
"_shards": {
"total": 21,
"successful": 21,
"failed": 0
},
"hits": {
"total": 2,
"max_score": 1,
"hits": [
{
"_index": "bill",
"_type": "bill",
"_id": "2650",
"_score": 1,
"_source": {
"id": 2650,
"name": "Order 1",
"orders": [
{
"id": 3200,
"item": {
"id": 3600,
"name": "Barbeque",
"price": 175
},
"quantity": 1,
"created": "2016-08-20 21:01:09"
},
{
"id": 3201,
"item": {
"id": 3601,
"name": "Pepsi",
"price": 25,
},
"quantity": 1,
"created": "2016-08-20 21:01:15"
},
{
"id": 3202,
"item": {
"id": 3602,
"name": "Beer",
"price": 120
},
"quantity": 1,
"created": "2016-08-20 21:01:20"
}
]
}
},
{
"_index": "bill",
"_type": "bill",
"_id": "3000",
"_score": 1,
"_source": {
"id": 3000,
"name": "Order 2",
"orders": [
{
"id": 3203,
"item": {
"id": 3602,
"name": "Beer",
"price": 120
},
"quantity": 2,
"created": "2016-08-20 15:34:09"
},
{
"id": 3204,
"item": {
"id": 3601,
"name": "Pepsi",
"price": 25
},
"quantity": 1,
"created": "2016-08-20 21:04:23"
}
]
}
}
]
}
}
The output should be like:
Item name Quantity
Pepsi 2
Beer 3
Barbeque 1
Can you help me get this data table in kibana?