pop random

Basic data handling: DictPopRandom

Removes and returns a random key-value pair from a dictionary. This node takes a dictionary as input, removes a random key-value pair, and returns the modified dictionary along with the removed key and value. If the dictionary is empty, it returns empty values.

Pack: Basic data handling

custom_nodes.ComfyUI-basic_data_handling

Inputs (1)

NameTypeRequired
input_dictDICTrequired

Outputs (4)

NameType
dictDICT
keySTRING
value*
successBOOLEAN