MCPcopy Create free account
hub / github.com/FlowiseAI/Flowise / getValueAtPath

Function getValueAtPath

packages/components/src/utils.ts:1998–2008  ·  view source on GitHub ↗
(obj: any, path: (string | number)[])

Source from the content-addressed store, hash-verified

1996
1997 // Helper function to get a value at a nested path
1998 const getValueAtPath = (obj: any, path: (string | number)[]): any => {
1999 let current = obj
2000 for (const key of path) {
2001 if (current && typeof current === 'object' && key in current) {
2002 current = current[key]
2003 } else {
2004 return undefined
2005 }
2006 }
2007 return current
2008 }
2009
2010 // Helper function to convert value to expected type
2011 const convertValue = (value: any, expected: string, received: string): any => {

Callers 1

parseWithTypeConversionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected