I\'m running an express.js app that has a few apis feeding data to dropdown boxes. The data returned is in the form:
[ { key: \'blah\',
In the current versions of Javascript you need a loop do to it.
However you can use a module like npm `lodash' to make it look simpler
var _ = require('lodash') var permittedValues = _.pluck(array, 'key')
link to pluck documentation