{"action":"created","issue":{"url":"https://api.github.com/repos/troolee/gridstack.js/issues/470","repository_url":"https://api.github.com/repos/troolee/gridstack.js","labels_url":"https://api.github.com/repos/troolee/gridstack.js/issues/470/labels{/name}","comments_url":"https://api.github.com/repos/troolee/gridstack.js/issues/470/comments","events_url":"https://api.github.com/repos/troolee/gridstack.js/issues/470/events","html_url":"https://github.com/troolee/gridstack.js/issues/470","id":160775869,"number":470,"title":"How to save Gridstack JSON output to local storage","user":{"login":"toddler4372","id":10601383,"avatar_url":"https://avatars.githubusercontent.com/u/10601383?v=3","gravatar_id":"","url":"https://api.github.com/users/toddler4372","html_url":"https://github.com/toddler4372","followers_url":"https://api.github.com/users/toddler4372/followers","following_url":"https://api.github.com/users/toddler4372/following{/other_user}","gists_url":"https://api.github.com/users/toddler4372/gists{/gist_id}","starred_url":"https://api.github.com/users/toddler4372/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toddler4372/subscriptions","organizations_url":"https://api.github.com/users/toddler4372/orgs","repos_url":"https://api.github.com/users/toddler4372/repos","events_url":"https://api.github.com/users/toddler4372/events{/privacy}","received_events_url":"https://api.github.com/users/toddler4372/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-06-16T22:31:21Z","updated_at":"2016-06-20T15:02:48Z","closed_at":null,"body":"Here is the 'saveGrid' portion of my serialize function.  I'm wanting to save the positions of my widgets, but I'm missing something here. Any ideas?\r\n\r\n```\r\nthis.saveGrid = function () {\r\n                this.serializedData = _.map($('.grid-stack > .grid-stack-item:visible'), function (el) {\r\n                    el = $(el);\r\n                    var node = el.data('_gridstack_node');\r\n                    return {\r\n                        x: node.x,\r\n                        y: node.y,\r\n                        width: node.width,\r\n                        height: node.height,\r\n                        content: $('.grid-stack-item-content', el).parent().html()\r\n                    };\r\n                }, this);\r\n\r\n                $('#saved-data').val(JSON.stringify(this.serializedData, null, '    '));\r\n\r\n                var items = GridStackUI.Utils.sort(this.serializedData);\r\n                localStorage.setItem(\"items\", JSON.stringify(items));\r\n                \r\n                console.log('grid is saved');\r\n                return false;\r\n            }.bind(this);\r\n```"},"comment":{"url":"https://api.github.com/repos/troolee/gridstack.js/issues/comments/227169085","html_url":"https://github.com/troolee/gridstack.js/issues/470#issuecomment-227169085","issue_url":"https://api.github.com/repos/troolee/gridstack.js/issues/470","id":227169085,"user":{"login":"ambit-ashish","id":6680003,"avatar_url":"https://avatars.githubusercontent.com/u/6680003?v=3","gravatar_id":"","url":"https://api.github.com/users/ambit-ashish","html_url":"https://github.com/ambit-ashish","followers_url":"https://api.github.com/users/ambit-ashish/followers","following_url":"https://api.github.com/users/ambit-ashish/following{/other_user}","gists_url":"https://api.github.com/users/ambit-ashish/gists{/gist_id}","starred_url":"https://api.github.com/users/ambit-ashish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ambit-ashish/subscriptions","organizations_url":"https://api.github.com/users/ambit-ashish/orgs","repos_url":"https://api.github.com/users/ambit-ashish/repos","events_url":"https://api.github.com/users/ambit-ashish/events{/privacy}","received_events_url":"https://api.github.com/users/ambit-ashish/received_events","type":"User","site_admin":false},"created_at":"2016-06-20T15:02:48Z","updated_at":"2016-06-20T15:02:48Z","body":"@toddler4372 : Thanks"}}
{"actor":{"display_login":"ambit-ashish"}}