find

Array-like helper that returns the first record matching a predicate.

Usage

const rec = ds.find(r => r.Id === 1);

API

find(predicate: (value: DataRecord<T>, index: number, obj: DataRecord<T>[]) => unknown): DataRecord<T> | undefined;

Last updated

Was this helpful?