Page tree
Skip to end of metadata
Go to start of metadata

Syntax

GROUPMAP(<any>; <any>)

Description

Creates a JSON map based on two columns of all records within a group, keys, and values.

This is an aggregate function

Example

Given the following data:

Customer_NameItem
2535JonZamioculcas
2888MikeSpider Lily
2535JonDatura
2535JonDahlia
5788JonSnapdragon
2888MikeMarguerite
2535JonWindflower
2888MikeElephant's Ear
2535JonChinese Evergreen
5788JonBegonia
5788JonStarfish Plant
2535JonHare's Foot Fern
2535JonVenus Flytrap
3545MoniqueRed Flame Ivy

First create a group using GROUPBY(#RawData!Name)

Name
Jon
Mike
Monique

Then use the GROUPMAP(#RawData!Item;#RawData!Customer_), and the result is a JSON map based on your two column records in relation to the GROUPBY() column.

Name
Jon{"Zamioculas":2535,"Datura":2535,"Dahlia":2535,"Snapdragon":5788,"Windflower":2535,"Chinese Evergreen":2535,"Begonia":5788,"Starfish Plant":5788,"Hare's Foot Fern":2535,"Venus Flytrap":2535}
Mike{"Spider Lily":2888,"Maguerite":2888,"Elephant's Ear":2888}
Monique{"Red Flame Ivy":3545}
  • No labels