.toJSON ()
toJSON() function is used to input element and values in a form into JSON name value pairs. toJSON() should be used againt a form Nedil Objects.
Returns
TypeDescription
JSONJSON with name value pairs of input elements in a form


Example 1
JS HTML
		$.domLoaded(function() {
			
			// inpJSON will contain all input elements name and values
			var inpJSON = $.get("#details").toJSON();

		});						
						
<body>

<form id="details" name="details" method="GET" action="../../ajax/AjaxServer.php">
	Enter your Name : <input type="text" name="uname" id="uname" /> <br/>
	<input type="button" id="ajax1" value="Ajax Submit" /><br/>
</form>

</body>