考虑:
var dummyArray = [{
"fname": "gali",
"lname": "doe"
}, {
"fname": "john",
"lname": "danny"
}, {
"fname": "joe",
"lname": "dawns"
}, {
"fname": "liji",
"lname": "hawk"
}]
dummyArray = j$.grep(dummyArray, function(dt) {
return (dt.fname== 'j');
});
如何使用grep函数查询包含字母“j”的“fname”?