javascipt : filter filter
var List = sizes.filter(function (size) { return size.id == 12; });
sizes = [ {id : 10,,stock:130},{id : 11,stock:120},{id : 12,stock:100} ]
filter is a new array, and then gives it the filtered object, and finally var list it up