JSON tips: filter objects from array of objects where object name is alpha What could be the shortest code for filtering the following array in Javascript without any library?

My code is: 

filtered_obj = _.where(obj, { name: "Alpha" });


This uses a JS library called underscore.

Test case:

objs = [{'id':1,'name':'Alpha'},{'id':2,'name':'Beta'},
{'id':3,'name':'Gamma'},{'id':4,'name':'Eta'},
{'id':5,'name':'Alpha'},{'id':6,'name':'Zeta'},
{'id':7,'name':'Beta'},{'id':8,'name':'Theta'},
{'id':9,'name':'Alpha'},{'id':10,'name':'Alpha'}];

filtered_obj =[{'id':1,'name':'Alpha'},{'id':5,'name':'Alpha'},
{'id':9,'name':'Alpha'},{'id':10,'name':'Alpha'}]
45 bytes



filtered_obj=objs.filter(n=&gt;n.name=='Alpha');


This uses the filter function for arrays.

Ideone it!