So I have a DB query that returns a list of lists that looks like this :
[["foobar", "boolean", true], ["baz", "actor", true], ["foobar", "actor", false]]
What I want to do is : if there are two lists with the same first element, but one has “boolean” as the second element, and the other has “actor”, I want to only keep the element with “actor” in the list
Therefore, if the above-given list is the input of my function, I expect the output of that function to be [["baz", "actor", true], ["foobar", "actor", false]]
I want to keep any “boolean” member if there is no other “actor” member with the same first element in my whole list.
The third value is then the one I am interested in.
How can I do that?
Let me know if this isn’t clear, have a good day!