#310·idb

How order for getAllFromIndex

Author: perfectCreated Apr 17, 2024Updated Feb 11, 2026

I have an index result

 const groupsTable = db.createObjectStore("groups", {
      keyPath: "groupId",
    });
    groupsTable.createIndex("boardId", "boardId", { unique: false });
 await db.getAllFromIndex("groups", "boardId", boardId);   

but I need order result by "index" property , sort it by code or sort function ? Can I get the right order from indexed DB directly?