Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

164
Visualizações
How can I create an index using indexedDB using child properties of the parent object

Example data structure:

{
  "Site": "pasta.com",
  "ID": 119318,
  "Buyer": {
    "ID": 5475630,
    "Name": "potato"
  }
}

Current Code:

static MigrateVersion2(db) {
    const siteStore = db.createObjectStore('sites', {
      keyPath: 'Site',
    });
    siteStore.createIndex('BuyerID', ['Buyer', 'ID']);
}

I need to use this store in IndexedDB to query by the site name, but I also need to be able to query by the buyer id. Is it possible for me to create an Index from the child object of the parent object that is stored in the database?

I saw a duplicate of this question but could not find the solution from it.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda