If you have an indexed array of objects, and you want to remove duplicates by comparing a specific property in each object, a function like the remove_duplicate_models() one below can be used.

The result is:

Leave a reply

Your email address will not be published. Required fields are marked *