...
When you copy/paste the code below, please make sure to get rid of the yellow spaces (shown in this picture). They will raise a “Type checking error” in your console.
...
How to get option’s IDs
To get to know the custom field and the option’s IDs, in the custom field context configuration screen click on Edit Options and Export CustomFields.
...
This is a sample JSON file containing with the information you are looking for:
...