Refactor value extraction to use underscore.js