ExerciseDB

FREEMIUM
Por Justin | Atualizado hace 2 días | Health and Fitness
Popularidade

9.9 / 10

Latência

356ms

Nível de serviço

97%

Health Check

100%

Voltar para todas as discussões

Filter equipment and target

Rapid account: Kudrlickajan
kudrlickajan
hace 3 meses

Hello, is there any solution to combine equipments and targets call for filtering? I don’t want to call all the exercises and filter it manually. Thank you for all responses.

Rapid account: Awesomedeepu 172037
awesomedeepu172037 Commented hace 3 meses

const handleSearch = async () => {
if (search) {
const exercisesData = await fetchData(‘https://exercisedb.p.rapidapi.com/exercises’, options);

  const searchedExercises = exercisesData.filter(
    (item) => item.name.toLowerCase().includes(search)
           || item.target.toLowerCase().includes(search)
           || item.equipment.toLowerCase().includes(search)
           || item.bodyPart.toLowerCase().includes(search)
  );

  
    console.log(exercisesData);
  setSearch('');
  setExercises(searchedExercises);
}

};

Rapid account: Justin W Fns XH T 6
justin-WFnsXH_t6 Commented hace 3 meses

There is no mechanism currently to handle this type of request but I will look at implementing it. Thank you.

Junte-se à discussão - adicione o comentário abaixo:

Efetue login / inscreva-se para postar novos comentários