in my graph, I have a node called class. one of its properties is a list property called names.
I am trying to traverse all nodes of class and replace all occurrences of a word with another new word. the name list might have one or more occurrences of the same word.
you are right, I made a mistake in inList. it should not have duplicates. and yes, the solution should retain the original order in the list. just replace the found item with its first character and the rest of the item.
there will be an input list “inList” of strings (unique items and no duplicates), I need to search this inList string against a property called “names” in every CLASS node. Whenever a match of any item in the inList with any item in names, the item in names should be replaced with two items which are the first letter and the rest of the item.
You stated the inList will not include duplicates, but your example does. I assume that is an error. Does the solution need to retain the original order of the names list?