_.each(key_val, function(e){
if($.inArray(e[0], names) == -1){
var node = {};
node.name = e[0];
if(e[1]) {
node.value = e[1];
node.symbolSize = e[1] * nodeProp;
}
optionNodes.push(node);
names.push(e[0]);
}
});
The code snippet above utilizes angular.js and I need to integrate it into an angular typescript environment. In this case, "key_val" represents an array.