I am currently trying to fetch specific arrays based on a certain criterion. I am a bit unsure about how to go about filtering the arrays, so I thought I would seek clarification here. Essentially, I have a list of courses and I want to extract all the courses where the level is equal to 1.
let courses = [{
math:[{id:1,level_id:1,requirement:'1 Credit'}]
spanish:[{id:5,level_id:1,requirement:'5 Credits'}]
technology:[{id:3,level_id:1,requirement:'2 Credits'}]
}];
let queryCoursesForLevelWhereIDMatches = 1
let returnedArrays = courses.filter()
console.log(returnedArrays);