A Pen by ma-henderson on CodePen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"atletas": [ | |
{ | |
"nome": "Leonardo Cittadini", | |
"slug": "leo-cittadini", | |
"apelido": "Léo Cittadini", | |
"foto": "https://s.glbimg.com/es/sde/f/2019/03/30/475167cdad7e826c64f4a0a999f8aef9_FORMATO.png", | |
"atleta_id": 70986, | |
"rodada_id": 1, | |
"clube_id": 293, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filterDoctors = (doctors, filters) => { | |
let filteredDoctors = []; | |
if (filters.gender.length > 0) { | |
filteredDoctors.concat( | |
filters.gender.map((gender) => | |
filteredDoctors.filter((doctor) => doctor.gender == gender) | |
) | |
); | |
} | |
if (filters.specs.length > 0) { |