Project

General

Profile

Group by property

Description

Groups the elements of Source array by the values of a given Property

Input/Output

Source array : array <= Source
Property : value <= Option

Output : array

Usage

  1. Connect a source to the operator
  2. Drag an array from the source tree and drop it into input field Source array
  3. Select Property
  4. Click on OK

Example

Source array = [{"user":"john", "genre":"male"}, {"user":"sonia", "genre":"female"}, {"user":"mario", "genre":"male"}]
Property = "genre"

Output = [{"name":"male", "members":[{"user":"john", "genre":"male"}, {"user":"mario", "genre":"male"}]}, {"name":"female", "members":[{"user":"sonia", "genre":"female"}]}]