K
Docs
API ReferencePiecesList Length
🔢

List Length

base.list.lengthBase SetUtility

Returns how many items are in a list spark. Pair with Condition to branch on empty lists or check leaderboard size.

On the canvas

This is what List Length looks like when you place it on your flow. Each field below is something you configure in the inspector panel.

🔢
List Length
base.list.length
Utility
listrequired
{{result}}
asrequired
count

Config fields

FieldTypeReqWhat it does
list
{{result}}
textyesList 📋
as
count
textyesSave count as ✨

Sparks this piece adds

After this piece runs, these values are available as sparks in every node downstream.

{{count}}numberList item count

Output ports

outputNumber spark with the count
📐

In TypeScript, this would be…

Not something you need to write — just a look at what Kitcord does for you.

TypeScript
const count = list.length;
// {{count}}