Skip to main content

Set to Array

Convert a set to an array

Written by Holly Conrad Smith

Use this once you're done comparing or deduplicating, and need to get back to a List, for example, after deduplicating a list of usage names with Set, convert it back so you can feed it into a node that expects a List, like Sort Numbers, Map, or a loop.

Set vs. List: a List (array) keeps items in order and can hold duplicates, and you access items by position, like "the 3rd item." A Set has no order and no duplicates. Adding an item that's already there does nothing, and there's no "position" to ask for. Sets are for asking "is this here?" and for comparing groups of things; Lists are for ordered, step-by-step sequences.

Category: Sets

Kind: Operation

Description: convert a set to an array

Inputs

Name

Abbreviation

Type

Access

Description

set

S

Set

Item

the set to convert

Outputs

Name

Abbreviation

Type

Access

Description

array

A

Any

List

the converted array

How to

  1. Add the Set to Array node.

  2. Feed in a set.

  3. The output is an ordinary List containing the same items, ready to use anywhere a List is expected.

Did this answer your question?