I have the following array of objects:
[{id:1, value:\"100\", name:\"dog\" ...},
{id:2, value:\"200\", name:\"cat\" ...},
{id:3, value:\"300\", name:\"fish\"
What you are trying to achieve is called mapping rather filtering. Here's a solution
var array = [{id:1, value:"100", name:"dog"},
{id:2, value:"200", name:"cat"},
{id:3, value:"300", name:"fish"},
{id:4, value:"400", name:"mouse"},
{id:5, value:"500", name:"snake"}];
var result = array.map(function(obj) {
return {id: obj.id, value: obj.value};
});
console.log(result);