JavaScript in Qualtrics: Referencing the displayed order of choices

For a question, I have 4 choices (alpha, beta, gamma, delta) displayed in random order through choice randomization. I want the displayed order of these choices to be captured in embedded data fields, to be used later in the survey.
For example, if the choices were displayed

beta
gamma
alpha
delta

I want embedded data fields pos_beta = 1, pos_gamma = 2, pos_alpha=3 and pos_delta=4.

If they were displayed

gamma
alpha
beta
delta

I want embedded data fields pos_gamma = 1, pos_alpha = 2, etc

Easiest way to implement this? (Also, could the answer be generic enough to capture if the choices had random text around the keywords – “blah blah gamma blah blah” etc?)

Thanks in advance!

(I looked at other questions on this site but could not find anything that addresses this).