title: In React filter and map API in each client has different values ​and amounts of values and I need to make a generic code that works for any case
body: <p>Explaining better, a client can have in the database that I receive the API, say, camera width, camera size and camera weight, and another client can have camera color, camera thickness, camera validity, camera depth, camera... So each client has different filters and different amount of filters. I need to make a generic code that works for any case, here is my code:</p>
  <pre><code>{APIData.filter(data =&gt; data.Result !== optionsData &amp;&amp;
                  (data.InspectionTime.replace(/-/g, &quot;&quot;).slice(0, 8) &gt;= startDate &amp;&amp;
                    data.InspectionTime.replace(/-/g, &quot;&quot;).slice(0, 8) &lt;= endDate))
                  .map((data, id) =&gt; {
                    const result = data.Result;
                    return (
                      &lt;tr
                        key={id}
                        className=&quot;table-row&quot;
                        onClick={() =&gt; {
                          setActiveRow(id);
                          setImageTest(id);
                        }}&gt;
                        &lt;td
                          className=&quot;table-data-date&quot;&gt;
                          {data.InspectionTime}
                        &lt;/td&gt;
                        &lt;td
                          className=&quot;table-data-state&quot;&gt;
                          {result == &quot;-2&quot; ? &quot;Processado&quot; : result == &quot;-1&quot; ? &quot;Falha&quot; :
                            result == &quot;0&quot; ? &quot;Reprovado&quot; : result == &quot;1&quot; ? &quot;Aprovado&quot; :
                              result == &quot;2&quot; ? &quot;Ignorado&quot; : null}
                        &lt;/td&gt;
                      &lt;/tr&gt;
                    )
                  })}
  </code></pre>
  <p>I already have in my code the result and date filters that are fixed for each client, I just need to implement these other filters that vary for each one, how can I do this within my code?</p>