Example wise, the red rectangles on the left, needs to be the same across frames, but they don’t share ID, or anything else, besides possibly the name.
Yes, you can write a function that will check the properties for compliance, for example, name, width, height, fills, fillStyleId, etc. of the objects you need.
@tank666 This was also my original thought. However as the elements can be placed differently, and have different height and width values, based on their format, these data can differ.
In that case, I think you need to decide for yourself what criteria to use to detect matches. Perhaps, in addition to the name (which can be changed by the user), you should check the node type (frame, rectangle, vector, instance, etc.). If the node is an instance, you can check its main component.