Display channels and groups list in iparams dropdown

Hi guys.
I’m trying to create a iparams in which I will be displaying the channels and groups of my freshchat account in a dropdown and let the user to choose only one channel and group.

I’m trying to achieve it using iprams.json and iparams.js, where in the iparams.js I will make the api calls for group and channel list and pass it to the iparams.json.

Can someone assist me for the same, I’m really struggling with this. This is for a client project for Freshchat.