I have an array, and the elements inside are a mix of 2 models: Article and Profile.
Is there a way to check if there is an Article and/or Profile model inside the array? The functions I saw like include? work for the specific elements and not their class.
Example:
Given [Profile1, Profile2, Article1] I wanted to check if there is an Article or Profile in there. I can only check if there is an element named Profile1.
Any help would be much appreciated! Thank you!