Iam trying to select/unselect the checkboxes based on the condition, if tag.id is equal to taged.id then make it check otherwise not. I am doing an update in the post so I need