Create a JSON object from HTML using jQuery and javascript : I would like to create JSON from HTML code using jQuery.

I have number of divs with class row, each div contains divs with class header and body.

Now, i would like to read the value of inputs from header and body and create a json object like below.

**HTML:**

    <form id="myForm">
    	<div class="row">
    		<div class="header">
    			<input type="checkbox" value="1">
    		</div>
    		<div class="body">
    			<input type="checkbox" value="11">
    			<input type="checkbox" value="12">
    		</div>
    	</div>
    	<div class="row">
    		<div class="header">
    			<input type="checkbox" value="2">
    		</div>
    		<div class="body">
    			<input type="checkbox" value="21">
    			<input type="checkbox" value="22">
    		</div>
    	</div>
    	<div class="row">
    		<div class="header">
    			<input type="checkbox" value="3">
    		</div>
    		<div class="body">
    			<input type="checkbox" value="31">
    			<input type="checkbox" value="32">
    		</div>
    	</div>
    </form>

**Desired Output
I want to generate (with jQuery) a JSON object similar to the following:**

    [
    	{
    		"line1": 1,
    		"line2": [11, 12]
    	},
    	{
    		"line1": 2,
    		"line2": [21, 22]
    	},
    	{
    		"line1": 3,
    		"line2": [31, 32]
    	}
    ]