I want to get the value of the selected option from a dropdown list, in D3.js.
I found this to be the simplest:
d3.select("#objectID").node().value;
Which is the text of the selected option in the following node:
Note that d3.node() is documented at https://github.com/mbostock/d3/wiki/Selections#node and the .value property of an HTMLInputElement is documented on MDN at https://developer.mozilla.org/en/docs/Web/API/HTMLInputElement.