JSFiddle - React, Tailwind, and code Playground

by shivaay123

JavaScript

const students = [
    { name: 'Johnny', sports: ['cricket', 'football'] },
    { name: 'Shiv', sports: ['Badminton', 'Hockey'] },
    { name: 'Dev', sports: ['Chess', 'cricket'] },
    { name: 'Vaatey', sports: ['Judo', 'football'] }

];

const Cricket = students.filter(e => e.sports.includes("cricket"));
console.log(Cricket);