Re: Finding an item using a lambda function in a List using the index() function

2022-08-12 Fir de Conversatie Yegappan Lakshmanan
Hi Bram, On Fri, Aug 12, 2022 at 10:06 AM Bram Moolenaar wrote: > > > Ernie Rael wrote: > > > On 8/12/22 7:41 AM, Yegappan Lakshmanan wrote: > > > Hi all, > > > > > > The index() function returns the lowest index in a List where an item > > > has a value equal to the supplied expression. This fu

Re: Finding an item using a lambda function in a List using the index() function

2022-08-12 Fir de Conversatie Maxim Kim
Not sure what to call it, indexfunc() ? - indexof() - indexby() -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message becau

Re: Finding an item using a lambda function in a List using the index() function

2022-08-12 Fir de Conversatie Bram Moolenaar
Ernie Rael wrote: > On 8/12/22 7:41 AM, Yegappan Lakshmanan wrote: > > Hi all, > > > > The index() function returns the lowest index in a List where an item > > has a value equal to the supplied expression. This function cannot be > > used to find an item with a specific key/value pair in a Lis

Re: Finding an item using a lambda function in a List using the index() function

2022-08-12 Fir de Conversatie Ernie Rael
On 8/12/22 7:41 AM, Yegappan Lakshmanan wrote: Hi all, The index() function returns the lowest index in a List where an item has a value equal to the supplied expression. This function cannot be used to find an item with a specific key/value pair in a List of Dicts (or to use a custom search in

Finding an item using a lambda function in a List using the index() function

2022-08-12 Fir de Conversatie Yegappan Lakshmanan
Hi all, The index() function returns the lowest index in a List where an item has a value equal to the supplied expression. This function cannot be used to find an item with a specific key/value pair in a List of Dicts (or to use a custom search in a List). You need to resort to using a for loop