Nodes/comfy-ovum/_.property
ComfyUI Node

_.property

A Factory That Makes a Property-Getter Function

By sfinktah·Created about a year ago·Updated 10 months ago· 7
_.property
  • py_dict
  • *
path

_.property doesn't return a value - it returns a function that fetches a value. Give it a property name, and you get back a getter you can feed to other nodes: hand that getter to a map-style or iteratee node, and it'll pull the named field out of whatever it's called on. It's the underscore-family version of "make me a pluck for a property I'll reuse everywhere."

How it works

The mechanism is straightforward: the node wraps the property name (or key) into a callable that does obj[key] or getattr(obj, key) - whichever fits - on whatever object is thrown at it. So _.property with name "a" produces a function where fn({"a": 5}) returns 5. I verified exactly that.

The inputs are where this node gets confusing:

  • py_dict - this is where the property name goes, despite the label
  • path - a string widget that, as shipped, doesn't actually reach the method

The path widget looks like the obvious control, but the method reads its key from the primary input. So don't type the property name into path and wonder why nothing works - the primary input is the one that matters. Output is a single ANY slot carrying the getter function.

The deep-path catch

The description promises deep property fetching with an array of keys or indexes. It doesn't. I tested passing a list path like ["x", "y"] and the port throws TypeError: unhashable type: 'list' - the underlying helper only handles a single, hashable key. So keep it to simple property names and don't expect nested paths to work in this version.

When you'd use it

This is a build-a-helper node, not a do-a-thing node. Its natural home is feeding a reusable getter into an iteratee-driven node - _.map, _.filter, _.sortBy - so you can say "sort by this field" without re-typing the field everywhere. It's also the kind of thing you reach for when you're assembling a custom function pipeline and want a named accessor rather than a lambda.

Honest caveat: if you're not already comfortable passing callables around your graph, this node will feel academic. The family's _.pluck gives you the same extraction power in a more direct, beginner-friendly form. Come back to _.property once you're building function pipelines.

Installing

Part of comfy-ovum. ComfyUI Manager → search comfy-ovum → Install, or:

cd ComfyUI/custom_nodes
git clone https://github.com/sfinktah/comfy-ovum

Restart ComfyUI. No models, no extra pip packages for the underscore nodes - the port is bundled in the repo.

The bottom line

A getter factory for iteratee pipelines. Remember: the property name goes in the primary input, and deep paths are a no-go. If that feels like too much ceremony, _.pluck does the extraction more simply.

Categoryovum/underscore

Inputs (2)

NameTypeDefaultDescription
py_dictopt*Primary input object (expected object). You can still pass any JSON-serializable value. Also accepts _.CHAIN to continue chaining.
pathoptSTRINGpath (string)

Outputs (1)

NameTypeDescription
**