JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://code.angularjs.org/1.0.1/angular-1.0.1.js" type="text/javascript"></script>
<html ng-app>
<head>
<script>
function MyCtrl($scope){
$scope.firstName = "Frank";
$scope.lastName = "Williams";
}
</script>
</head>
<body>
<div id="settingsholder" ng-controller="MyCtrl">
<input ng-model="firstName" />
<input ng-model="lastName" />
<input type="button" id="btnToJson" value="Object To JSON" />
</div>
</body>
</html>
JavaScript
$(document).ready(function(){
$("#btnToJson").click(function(){
var theScope = angular.element($("#settingsholder")).scope();
var inJson = angular.toJson(theScope);
console.log(inJson);
});
});