What is the command syntax for joining variables from lists by index?

Hi guys, I have two variables that I need to combine, e.g. FQDN & OCID and I require the following format.

FQDN1=OCID1,FQDN2=OCID2,FQDN3=OCID3

Can anyone assist with command syntax?

Figured it but not deleting question as it may help someone.

${join(",", formatlist("%s=%s", fqdn, ocid))}