Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var stateObject = getState();
- console.log( "Current State:" );
- console.log( stateObject );
- var json = JSON.stringify( stateObject );
- console.log( "JSON representation:" );
- console.log( json );
- var setState = function ( json ) {
- var stateObject = JSON.parse( json );
- console.log( "Set this state:" );
- console.log( stateObject );
- };
- $('input').val( '' );
- setState( json );
Add Comment
Please, Sign In to add comment