Does anyone knows what is the function to get multiple of occurrences of an item in a list as list of indexes.
example:
with fun(iList,"item") as occurencesOfItem
unwind occurencesOfItems
....
Does anyone knows what is the function to get multiple of occurrences of an item in a list as list of indexes.
example:
with fun(iList,"item") as occurencesOfItem
unwind occurencesOfItems
....
I replied earlier but the reply lost.
thank you so much glilienfield. it amazing. it works great!!.
I am not sure I understand your requirement. I think you want a method of deriving the indexes of a given item from a list of elements. If so, the following demonstrates a solution for a list of integers. The result of executing the cypher is [2,4], which is index positions of each occurrence of '6'.
with [3, 4, 6, 2, 6, 3, 7] as x, 6 as item
return [i in range(0,size(x)-1) where x[i] = item] as indexes
Is this what you are looking for?