wistron i40 elasticsearch aggregations
npm install wistroni40-es-flatter
npm i wistroni40-es-flatter --save
`
Table of Contents
- Quickstart
- Feature
- API
- ElasticSearchAggsFlatter
Quickstart
index.ts
`typescript
const flattedResult = new ElasticSearchAggsFlatter(result).getBody();
`
Full Example
Feature
* 將查詢到的ElasticSearch Aggregations扁平化
API
ElasticSearchAggsFlatter
Abstract Class,ElasticSearch聚合資料攤平工具
$3
建構值
Parameter | Type | Required | Default | Description
|:-----|:-----:|:-----:|:-----:|:-----|
| data | any | Required | `undefined` | 要扁平化的聚合數據 |
$3
#### getBody
取得扁平化後的資料內容
Parameter | Type | Required | Default | Description
|:-----|:-----:|:-----:|:-----:|:-----|
| returns | T | Required | `undefined`` | 回傳扁平化後的資料內容 |