bucketItemReduce()
Home > @gooddata/sdk-model > bucketItemReduce
bucketItemReduce() function
Creates a new bucket by modifying items of the provided input bucket.
Signature:
export declare function bucketItemReduce(bucket: IBucket, reducer?: BucketItemReducer): IBucket;
Parameters
Parameter | Type | Description |
---|---|---|
bucket | IBucket | bucket in which all items are applied the modification function |
reducer | BucketItemReducer | (Optional) the reducer function to apply to the bucket items |
Returns:
new instance of bucket with modified bucket items
Remarks
Array of item from the input bucket will be dispatched to the reducer function and the result of the modification will be included in the new bucket.