Finds an object in an array based on the specified field name and value.
The array of objects to search.
The name of the field to search.
The value to search for.
The first object in the array that matches the criteria, or null if no match is found.
{{!-- items is an array of objects: [{id: 123, name: 'Item A'}, {id: 456, name: 'Item B'}] This code will output: "Item A" --}}{{#each items}} {{#if (eq id 123)}} {{lookup (findObjectInArray ../items 'id' id) 'name'}} {{/if}}{{/each}} Copy
{{!-- items is an array of objects: [{id: 123, name: 'Item A'}, {id: 456, name: 'Item B'}] This code will output: "Item A" --}}{{#each items}} {{#if (eq id 123)}} {{lookup (findObjectInArray ../items 'id' id) 'name'}} {{/if}}{{/each}}
Finds an object in an array based on the specified field name and value.