Skip to content

Instantly share code, notes, and snippets.

Created September 26, 2015 12:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/35ad85d54608afb4ad56 to your computer and use it in GitHub Desktop.
Save anonymous/35ad85d54608afb4ad56 to your computer and use it in GitHub Desktop.
<script type="text/javascript">
var settid = "sitelocked";
var status = false;
var data = { "sitelocked":true, "officelocked":false, "paging":20 };
if(status === true){
console.log('ITS TRUE');
data[settid] = status;
}else if(status === false){
console.log('ITS FALSE');
data[settid] = status;
}
console.log(data);
alert(JSON.stringify(data));
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment