@wtasnorg/node-lib / findValue
findValue(
obj,target,compare?,whenFound?):void
Defined in: src/find-value.ts:66
Search obj recursively for entries whose value satisfies compare(target, value).
Every match is reported via whenFound.
Record<string, unknown>
The object to search.
unknown
The value to look for.
Comparator (defaults to strict equality).
Callback for each match (defaults to console.log).
void
const results: FindValueMatch[] = [];
findValue({ a: { b: 42 } }, 42, undefined, (m) => results.push(m));
// results → [{ loc: "a.b", val: 42 }]