SyntaxFix
Write A Post
Hire A Developer
Questions
with LoDash you could simply do this:
_.transform(this.attributes, function (result, item) { item.specified && (result[item.name] = item.value); }, {});