Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

166
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!