Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

132
Vistas
How to display another field from firebase

So, this might be an easy question, but I am currently displaying food items from my firebase database with items that have corresponding "Category". I want to display all items that have a field in the database that have "All_Day_Special : true" in the "All Day Special" category on my website.

Here is my code so far.

const filterItems = items?.filter(item => {
        switch (activeCategory) {
          case 'all':
            return true
          case 'appetizers':
              break
          case 'addIns':
              break
          case 'beef':
          case 'chicken':
          case 'chowMein':
          case 'combinations':
          case 'deepFriedGoodiness':
          case 'dessert':
          case 'flavor':
          case 'friedRice':
          case 'hot':
          case 'pork':
          case 'seafoodPlatter':
          case 'sides':
          case 'vegetable':
          case 'whatsCooking':
          case 'wing':
                return item.category === activeCategory
            default:
                return true
        }
    });

Here is how my database is formatted. Firebase DB

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda