Skip to main content
Version: Next

Find First Matching Key Value

info

Please note that this content is under development and is not ready for implementation. This status message will be updated as content development progresses.

Description

The findFirstMatchingKeyValue service searches for the first occurrence of a specific key within a deeply nested object and retrieves its corresponding value. If the key is found, the function immediately returns the value. If the key does not exist, the function returns undefined.

The function uses a recursive approach to traverse the nested structure. It supports cases where the input data is null, undefined, or empty and ensures the search is performed safely.

Diagram

Example

{
"name": "findFirstMatchingKeyValue",
"parameters": {
"targetKey": "key"
}
}

Definitions

PropertyRequiredDescriptionType
dataYesThe nested object to search throughObject
targetKeyYesThe key to search for within the nested objectString

Function type

TypeDescription
ReturnDataIt processes the input data or generates data independently and returns the processed result after successful execution.