-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to create index on array element in indexeddb #11
Comments
Please refer to indexeddb documentation https://developer.mozilla.org/en-US/docs/IndexedDB/Using_IndexedDB to learn how to create indexes (on array elements). |
Thanks webcss, I am able to create index on array element if I have object like this, var data = { by using: But I am not able to create index on array of object element. eg: In object above data object has Student array, which has multiple objects. And I want to create index on array of object (data.Student.stud_name). Is it possible to create such type of index? |
As proposed here https://developer.mozilla.org/en-US/docs/IndexedDB/Using_IndexedDB#Structuring_the_database it definitly is possible to solve your problem. |
Has there been a solution to this? |
It currently is not possible to create an index from a property of an object in an array of objects. There was an issue filed for the spec that you can follow here: w3c/IndexedDB#35 |
I have an object.
var _data = {
teacher : {
name : "Mack",
subject : "Maths"
},
Student : [{
stud_name : "Alex",
stud_id : 1
},{
stud_name : "Jack",
stud_id : 2
},{
stud_name : "Mark",
stud_id : 3
}]
};
I want to create index on array element of object.
i.e, I want to create an index on stud_name. Is it possible to create such type of index in indexeddb?
The text was updated successfully, but these errors were encountered: