nodes.where
where(filter: NodeFilter): NodeQueryBegin a chainable query that filters nodes by the given predicate.
Returns a NodeQuery builder; call .toArray() to materialize results
or .remove() / .hide() etc. to act on the matched set directly.
Not undoable until a terminal mutation method is called on the returned query.
filter | NodeFilter | A predicate or filter descriptor applied to all nodes. |
Returns: NodeQuery
Example
const people = api.nodes.where({ category: "Person" }).toArray();
await api.nodes.where({ category: "Ghost" }).remove();