I need to write a function where I need to check if current user belong to specific sharepoint group.
Senario: I have site like ship, logistic etc and sharepoint group like ship site member, logistic site member. User ABC is added in ship site member as he belong to ship.
When user login to site function need to validate if ABC belong to ship or logistic or both or more.
Please someone provide me piece of code