Getting the label as a usable value
Getting the label as a usable value

If I have something like this...
label: "End Time:",
name: "endingtime",
type: "select",
options: [
{ label: "7:00 AM", value: 0 },
{ label: "7:15 AM", value: 15 },
{ label: "7:30 AM", value: 30 },
{ label: "7:45 AM", value: 45 },
How would I get the value of the label, not the value of the value?
If I wanted var endtime = editor.field( 'endingtime' ).val(); to be 7:00 AM Instead of 0.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Got it!