I'm trying to create a function that acts like a search mechanism which goes through an array of objects and returns a particular array object which contains a particular value (search parameter) in this array
var jobs= [
  {
    "startDate": "5/2017",
    "endDate": null,
    "isCurrent": true,
    "seniority": "Senior",
  },
  {
    "startDate": "5/2013",
    "endDate": "5/2019",
    "isCurrent": false,
    "seniority": "Junior",
  },
]
I want to create a function where you provide an array, array key and an array value i.e
nameOfFunction(jobs,"seniority","Senior") 
and it returns/logs
{"startDate": "5/2017","endDate": null,"isCurrent": true,"seniority": "Senior",},
 
     
     
     
     
    