Getting values of select type without putting it on database

I want to get all the data in a variable from frontend without clicking the save button. In detail, I want those values at realtime ie, whenever user changes the value it gets fetched.

Any help will be appreciated

Something like mentioned in below link?

Didn’t worked:

z=frm.set_df_property('Lead','options', [""].concat(testing_field)); 
console.log(z);

giving error

On trying with

var df = frappe.meta.get_docfield("Lead","testing_field", cur_frm.doc.testing_field);
df.read=1;
console.log(df);

I am getting all the values. Any way to find a particular one
??