SailPoint IIQ - Plugin help

Hello Experts,

I am trying to hide a button from Entitlement catalog using a plugin but the logic should check the current user is part of a workgroup or not, if so dont hide otherwise hide.

I have the .js but unsure how to check the user is part of a workgroup from Jquery, can someone help?

Thanks