On the lookout for male objects in this list.
list=[
{ id: 1, name: "Sam", sex: "M"},
{ id: 2, name: "Jane", sex: "F"},
{ id: 3, name: "Mark", sex: "M"},
{ id: 4, name: "Mary, sex: "F"},
{ id: 5, name: "Olivia", sex: "F"},
{ id: 6, name: "Bob", sex: "M"}
]
var maleList = ??? //extracted male entries