1.0.2 • Published 3 years ago
wistroni40-es-flatter v1.0.2
wistroni40-es-flatter
Install
npm i wistroni40-es-flatter --save
Table of Contents
Quickstart
index.ts
const flattedResult = new ElasticSearchAggsFlatter(result).getBody<any>();
Feature
- 將查詢到的ElasticSearch Aggregations扁平化
API
ElasticSearchAggsFlatter
Abstract Class,ElasticSearch聚合資料攤平工具
constructor
建構值
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
data | any | Required | undefined | 要扁平化的聚合數據 |
Methods
getBody
取得扁平化後的資料內容
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
returns | T | Required | undefined | 回傳扁平化後的資料內容 |