I have a collection (list) of objects like below,
books{
book1[
isSelected = false;
/*other properties*/
],
book2[
isSelected = true;
/*other properties*/
],
book3[
isSelected = false;
/*other properties*/
]
}
I want to iterate over this list and print ALL the objects which are having property isSelected as true followed by ALL the objects having property isSelected as false.
Please guide me on this approach.