ExerciseDB

부분 유료
분류별 Justin | 업데이트됨 2 days ago | Health and Fitness
인기

9.9 / 10

지연 시간

356ms

서비스 수준

96%

Health Check

100%

모든 토론으로 돌아가기

Filter equipment and target

Rapid account: Kudrlickajan
kudrlickajan
3 месяца назад

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 3 месяца назад

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 3 месяца назад

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

아래에 의견을 추가하고 토론에 참여하세요.

새 댓글을 게시하려면 로그인 / 가입