That in the first post is a copy and paste from the logging pane. I have logged both arrays to debug logging and compared. They are identical in case without any control characters.
I spent hours trying and carefully comparing. Has anyone else got this removeAll method working in ST? It just doesnβt work in multiple tests and I performed.
Do both lists contain elements of the same type? Wondering if it could look like a string but really be an object in there and youβre just seeing the toString() in the logs.
If in a SmartApp the following code doesnβt result in [bar], then we can say thereβs a problem with the SmartThings Groovy:
Thanks for your helpβ¦i do feel a bit sheepish now. I was convinced I got the first array by calling the object.name in my code, however you were correct that I was just calling the object when I checked after reading your post.
Cheers for that as I could not see the wood for the trees
Yeah, one of the benefits of dynamic languages is you donβt have to litter your code with typing informationβ¦ but the downside is that types still matter, and itβs not always clear what type your dealing with