API Reference > bentleyjs-core > Collections > ReadonlySortedArray > findEquivalent findEquivalent Method Find an element that compares as equivalent based on some criterion. If multiple elements are equivalent, the specific one returned is unspecified. As an example, consider a SortedArray<ModelState> which uses ModelState.id as its ordering criterion. To find a model by its Id, use sortedArray.findEquivalent((element) => compareStrings(element.id, modelId)) where modelId is an Id64String. findEquivalent(criterion: (element: T) => number): undefined | T see ReadonlySortedArray.indexOfEquivalent. Parameter Type Description criterion (element: T) => number A function accepting an element and returning 0 if it compares as equivalent, a negative number if it compares as "less-than", or a positive value if it compares as "greater-than". Returns - undefined | T The first element found that meets the criterion, or undefined if no elements meet the criterion. Defined in core/bentley/src/SortedArray.ts Line 161 Last Updated: 12 June, 2024