1
私はindexedb dbを初めて使用しています。 indexeddbのjsonオブジェクトの中にデータフィールドを追加することは可能ですか?私は何をしたいのかイメージを投稿しました。私はキーにタイムスタンプを持っていますが、値の側にはオブジェクトがあります。内部オブジェクト私はprice:"120",todo:"soap"
を持っていますが、このオブジェクトの中に別のもう1つのインデックスを作成して、ボタンをクリックして作成する必要があります。インデックス付きdbにjsonオブジェクトを追加する方法
画像は私が
request.onupgradeneeded = function(event) {
alert("baaakshu");
var request = event.target;
var tx = request.transaction;
var store = tx.objectStore("todostore", {keyPath: "timestamp"});
store.createIndex("bakshu", "lala", { unique: false });
};
お願いします。 –