ComfyUI Node

_.head

Get the first element of an array. Passing **n** will return the first N values in the array. Aliased as `head` and `take`. The **guard** check allows it to work with `_.map`. Note: not passing `n` will return the first item, passing `n=1` will return a list containing only the first item. (as per underscore.js)

By sfinktah·Created 12 months ago·Updated 9 months ago· 6
_.head
  • obj
  • default
  • *
n1
Categoryovum/underscore

Inputs (3)

NameTypeDefaultDescription
objopt*Primary input object. Also accepts _.CHAIN to continue chaining.
noptINT1n (int)
defaultopt*default: JSON allowed for arrays/objects where applicable.

Outputs (1)

NameTypeDescription
**