Check if all items are equal

So I’m trying to write some code to sync a few variables and what I need to do is iterate through each item in a group and see if each of the items are set to the same value, and if they, are set an item level to that value. Has anyone done this before or is there an easier approach that I’m just overlooking? If anyone has feedback I’d appreciate the thoughts.

Thanks!

You should have a look at the working with groups design pattern from @rlkoshak