instance method SpahQL#set
SpahQL#set(key, value) → SpahQL
- key (String, Number): The key to set on this result
- value: The value to set for the given key SpahQL#set(dictionary) -> SpahQL
- dictionary (Object): A key/value hash containing multiple keys to be set.
Take the data for the first result item in this set, and set a key on it. Has no effect if the data being modified is a basic type such as a string or number.
var db = SpahQL.db({foo: {a: “b”}}); var foo = db.select(“/foo”); foo.set(“new-key”, “moose”); //-> data is now {foo: {a: “b”, “new-key”: “moose”}}
Returns self.