JavaScript - filter Array and Use match
var arrayData =
[{
name: '小明',
age: 16
},{
name: '漂亮阿姨',
age: 24
},{
name: '杰倫',
age: 20
}];
var filterData = [];
var filterText = ''; //要過濾的文字
filterData = arrayData.filter(function(item) {
return item.name.match(filterText);});