-
-
Notifications
You must be signed in to change notification settings - Fork 668
Dexie.setByKeyPath()
David Fahlander edited this page May 6, 2014
·
4 revisions
Modify a property in an object given a key path and value.
var obj = {
name: "Kalle",
address: {
street: "East 13th Street",
city: "New York"
}
};
Dexie.setByKeyPath(obj, "address.street", "Elm Street");
alert (Dexie.getByKeyPath(obj, "name")); // Will alert ("Kalle");
alert (Dexie.getByKeyPath(obj, "address.street")); // Will alert ("Elm Street");
Dexie.js - minimalistic and bullet proof indexedDB library