> ## Documentation Index
> Fetch the complete documentation index at: https://learn.workflow.dog/llms.txt
> Use this file to discover all available pages before exploring further.

# Find Matching Object

> Find the first or all objects whose property meets a condition.

The **Find Matching Object** action searches a list using one property path and
a configurable comparison. Return the first match for lookup workflows, or all
matches for filtering workflows.

## Inputs

| Input                      | Type            | Required  | Description                                                         |
| -------------------------- | --------------- | --------- | ------------------------------------------------------------------- |
| **Objects**                | List of objects | Yes       | The objects to search, in priority order.                           |
| **Property Name**          | String          | Yes       | The top-level key or nested path whose value is tested.             |
| **Match Mode**             | Match mode      | Yes       | The comparison to perform. Defaults to **Exact Value**.             |
| **Search Value**           | Varies          | Sometimes | Required by value, text, regex, and numeric modes.                  |
| **Find Multiple Objects?** | Boolean         | No        | Returns every match instead of only the first. Defaults to `false`. |

## Outputs

<Tabs>
  <Tab title="First match">
    | Output           | Type   | Description                               |
    | ---------------- | ------ | ----------------------------------------- |
    | **Found Object** | Object | The first matching object in input order. |

    When nothing matches, no object value is found.
  </Tab>

  <Tab title="Multiple matches">
    | Output            | Type            | Description                           |
    | ----------------- | --------------- | ------------------------------------- |
    | **Found Objects** | List of objects | Every matching object in input order. |

    When nothing matches, the output is an empty list.
  </Tab>
</Tabs>

## Match modes

| Mode                      | Search Value       | A property matches when…                               |
| ------------------------- | ------------------ | ------------------------------------------------------ |
| **Exact Value**           | Any                | It is loosely equal to the search value.               |
| **Empty**                 | None               | It is exactly an empty string.                         |
| **Not Empty**             | None               | It is anything other than an empty string.             |
| **Contains Text**         | String             | Its text form contains the search text, ignoring case. |
| **Matches Regex**         | Regular expression | Its text form matches the pattern.                     |
| **Greater Than**          | Number             | It is a number greater than the search value.          |
| **Less Than**             | Number             | It is a number less than the search value.             |
| **Greater Than or Equal** | Number             | It is a number at least as large as the search value.  |
| **Less Than or Equal**    | Number             | It is a number no larger than the search value.        |
| **Is True**               | None               | It is the boolean `true`.                              |
| **Is False**              | None               | It is the boolean `false`.                             |
| **Is Truthy**             | None               | JavaScript treats it as truthy.                        |
| **Is Falsy**              | None               | JavaScript treats it as falsy.                         |

**Property Name** supports paths such as `customer.plan` and
`items[0].quantity`.

### Important comparison details

* **Exact Value** uses loose primitive equality, so the number `42` can match
  the text `"42"`, and `null` can match a missing value.
* **Empty** matches only empty text. It does not match `null`, missing
  properties, empty objects, or empty lists.
* Consequently, **Not Empty** also matches missing properties and non-string
  values.
* **Contains Text** converts objects and lists to JSON text and compares
  without case sensitivity.
* Numeric modes require the property itself to be a number.
* Falsy values include `false`, `0`, empty text, `null`, and missing values.

<Warning>
  For **Matches Regex**, turn off the regex's **Global** flag. Reusing a global
  regex across several objects can advance its internal match position and skip
  otherwise valid matches.
</Warning>
