Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Comercial
    • Calculadora

0

41
Vistas
How do i add another Injury status there is more than one
data = data.map(
  ({
    PlayerID,
    Status,
    TeamID,
    Jersey,
    PositionCategory,
    Height,
    Weight,
    BirthDate,
    College,
    PhotoUrl,
    Experience,
    FanDuelPlayerID,
    DraftKingsPlayerID,
    FanDuelName,
    DraftKingsName,
    ...rest
  }) => rest
);



let eastern = data.filter((item) => item.InjuryStatus === "Out");
7 months ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I will make an assumption on this question. "You want to return an array with players that have more than one InjuryStatus, such as if the status is "Out" or the status is "Pending" "

Since you are using javascript as your language, there are a few ways to write this. I will go with the most direct way. I will use a simple boolean expression in the condition.

Using your statement, this would look like this:

let eastern = data.filter((item) => (item.InjuryStatus === "Out" || item.InjuryStatus === "Pending"));
7 months ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos