npm i wistroni40-es-flatter --save
index.ts
const flattedResult = new ElasticSearchAggsFlatter(result).getBody<any>();
- 將查詢到的ElasticSearch Aggregations扁平化
Abstract Class,ElasticSearch聚合資料攤平工具
建構值
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
data | any | Required | undefined |
要扁平化的聚合數據 |
取得扁平化後的資料內容
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
returns | T | Required | undefined |
回傳扁平化後的資料內容 |