eligius
    Preparing search index...

    Variable findInArrayConst

    findInArray: TOperation<
        IFindInArrayOperationData,
        Omit<
            IFindInArrayOperationData,
            "findProperty"
            | "findValue"
            | "findPredicate",
        >,
    > = ...

    Finds the first element in an array matching criteria.

    Operates on arrayData passed from previous operations. Supports two search modes:

    1. Property equality: findProperty and findValue to find by property match
    2. Custom predicate: findPredicate function for complex search logic

    Returns undefined for foundItem and -1 for foundIndex if no match found.

    Operation data with foundItem (the matching element) and foundIndex (its position)

    // Find by property equality
    const result = findInArray({
    arrayData: [{id: 1, name: 'Alice'}, {id: 2, name: 'Bob'}],
    findProperty: 'id',
    findValue: 2
    });
    // result.foundItem = {id: 2, name: 'Bob'}
    // result.foundIndex = 1
    // Find with custom predicate
    const result = findInArray({
    arrayData: [10, 25, 30, 45],
    findPredicate: (item) => item > 30
    });
    // result.foundItem = 45
    // result.foundIndex = 3