ExerciseDB

フリーミアム
よって Justin | 更新済み 7일 전 | Health and Fitness
人気

9.9 / 10

レイテンシー

359ms

サービスレベル

98%

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.

ディスカッションに参加しましょう-以下にコメントを追加してください:

ログイン/サインアップして新しいコメントを投稿