{"action":"created","issue":{"url":"https://api.github.com/repos/ractivejs/ractive/issues/1649","labels_url":"https://api.github.com/repos/ractivejs/ractive/issues/1649/labels{/name}","comments_url":"https://api.github.com/repos/ractivejs/ractive/issues/1649/comments","events_url":"https://api.github.com/repos/ractivejs/ractive/issues/1649/events","html_url":"https://github.com/ractivejs/ractive/issues/1649","id":54997432,"number":1649,"title":"ractive.unset(keypath) would be great!","user":{"login":"pakastin","id":1475902,"avatar_url":"https://avatars.githubusercontent.com/u/1475902?v=3","gravatar_id":"","url":"https://api.github.com/users/pakastin","html_url":"https://github.com/pakastin","followers_url":"https://api.github.com/users/pakastin/followers","following_url":"https://api.github.com/users/pakastin/following{/other_user}","gists_url":"https://api.github.com/users/pakastin/gists{/gist_id}","starred_url":"https://api.github.com/users/pakastin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pakastin/subscriptions","organizations_url":"https://api.github.com/users/pakastin/orgs","repos_url":"https://api.github.com/users/pakastin/repos","events_url":"https://api.github.com/users/pakastin/events{/privacy}","received_events_url":"https://api.github.com/users/pakastin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-01-21T09:47:21Z","updated_at":"2015-02-06T21:48:11Z","closed_at":"2015-01-23T22:23:04Z","body":"Ractive.js is missing ```ractive.unset(keypath)```. When you have an object, you can't use ```delete```, because binding wouldn't work. Setting the whole object again without the key is fine when you have small object, but when you have large dictionary, it gets slow..\r\n\r\nYou could use ```ractive.set(keypath, 'undefined')```, but the key is still there, it's just ```undefined```."},"comment":{"url":"https://api.github.com/repos/ractivejs/ractive/issues/comments/73318725","html_url":"https://github.com/ractivejs/ractive/issues/1649#issuecomment-73318725","issue_url":"https://api.github.com/repos/ractivejs/ractive/issues/1649","id":73318725,"user":{"login":"arxpoetica","id":111424,"avatar_url":"https://avatars.githubusercontent.com/u/111424?v=3","gravatar_id":"","url":"https://api.github.com/users/arxpoetica","html_url":"https://github.com/arxpoetica","followers_url":"https://api.github.com/users/arxpoetica/followers","following_url":"https://api.github.com/users/arxpoetica/following{/other_user}","gists_url":"https://api.github.com/users/arxpoetica/gists{/gist_id}","starred_url":"https://api.github.com/users/arxpoetica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arxpoetica/subscriptions","organizations_url":"https://api.github.com/users/arxpoetica/orgs","repos_url":"https://api.github.com/users/arxpoetica/repos","events_url":"https://api.github.com/users/arxpoetica/events{/privacy}","received_events_url":"https://api.github.com/users/arxpoetica/received_events","type":"User","site_admin":false},"created_at":"2015-02-06T21:48:11Z","updated_at":"2015-02-06T21:48:11Z","body":"Actually, @Rich-Harris I just ran into this need. We've been using `undefined` as a sort of stop-gap in lieu of `unset`, but I just discovered that (strangely) (and this might need to be another ticket) setting a variable to undefined does not always work.\r\n\r\nSpecifically we've been working with video.js, and I check a `player` data variable, and if it exists, we'll reuse the player (instead of creating another one). On teardown, however, I make sure to actually \"unset\" that variable, and we've been using `this.set('player', undefined)` but I just now discovered that setting to undefined doesn't always work.\r\n\r\nI verified this by changing it to `null` and it suddenty started working consistently. In any case, I'm probably going to use @martypdx's `unset` hack above, but it would be nice to actually have that built in. There are numerous instances where we've been setting things to `undefined`, but I'm going to be more hesitant to use that in the future, knowing that it's problematic. Let me know if you want me to open a new ticket. :+1: "}}