Project

General

Profile

Sort by property

Description

Sorts the elements of Source array by the values of Property

Input/Output

Source array : array <= Source
Property : value <= Option
Direction : 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. Select Direction (ASC/DESC)
  5. Click on OK

Example

Source array = [{"key1":"value1", "key2":21}, {"key1":"value2", "key2":12}, {"key1":"value3", "key2":15}]
Property = "key2"
Direction = "ASC"

Output = [{"key1":"value2", "key2":12}, {"key1":"value3", "key2":15}, {"key1":"value1", "key2":21}]