JSFiddle - React, Tailwind, and code Playground
by Jake
HTML
<b id="b"></b>
JavaScript
const staff = [
{
staff: "Jake Paris",
username: 'jparis',
departments: ["Systems Development and Integration", "Bates Communications"],
services: ['website'],
locations: ['Pettigrew Hall'],
},{
staff: "Courtney Seymour",
username: 'cseymour',
departments: ["Library"],
services: ['ill', 'research'],
locations: ['Ladd Library'],
},{
staff: "Kendall Blake",
username: 'kblake',
departments: ["Systems Development and Integration"],
services: ['website', 'networking', 'Kubernetes'],
locations: ['Pettigrew Hall'],
},{
staff: "Rob Spellman",
username: 'rspell',
departments: ['Networking and Infrastructure'],
services: ['networking', 'CAS', 'SSO', 'Kubernetes'],
locations: ['110 Russell'],
},
];
var b = document.getElementById('b');
const kb = staff.filter( u => u.username == 'jparis' );
console.log(kb);