📜  return where an property eqauls - 不管代码示例

📅  最后修改于: 2022-03-11 14:55:48.127000             🧑  作者: Mango

代码示例1
const jsObjects = [
  {a: 1, b: 2}, 
  {a: 3, b: 4}, 
  {a: 5, b: 6}, 
  {a: 7, b: 8}
]

let result = jsObjects.filter(obj => {
  return obj.b === 6
})

console.log(result)