Skip to content

Instantly share code, notes, and snippets.

@shlomif
Forked from anonymous/JSX.html
Last active September 26, 2015 12:38
Show Gist options
  • Save shlomif/d111290dab4c4469b635 to your computer and use it in GitHub Desktop.
Save shlomif/d111290dab4c4469b635 to your computer and use it in GitHub Desktop.
<script type="text/javascript">
var settid = "sitelocked";
var status2 = false;
var data = { "sitelocked":true, "officelocked":false, "paging":20 };
if(status2 === true){
console.log('ITS TRUE');
data[settid] = status2;
}else if(status2 === false){
console.log('ITS FALSE');
data[settid] = status2;
}
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