Seeking assistance with building nested array in JavaScript
<p>This is a question that has come up a few times on here in the past but I just can't get my head around it.</p>

<p>This is how my output is looking at the moment:</p>

<pre><code>0 "affiliate_hoover_plugin_options[1][radioName]:mac"

1 "checked:true"

2 "affiliate_hoover_plugin_options[2][radioName]:pc"

3 "checked:false"

4 "affiliate_hoover_plugin...ons[3][radioName]:linux"

5 "checked:false"
</code></pre>

<p>And this is how I want it to look:</p>

<pre><code>1: "affiliate_hoover_plugin_options[1][radioName]:mac", "checked:true"

2: "affiliate_hoover_plugin_options[2][radioName]:pc", "checked:false"

3: "affiliate_hoover_plugin...ons[3][radioName]:linux", "checked:false"
</code></pre>

<p>This is how my code looks:</p>

<pre><code>var newForm = [];

for (var i = 1; i &lt; oldForm.length; i += 1) {

newForm.push(oldForm[i].name + ":" + oldForm[i].value);

if (oldForm[i].type === "radio") {
    newForm.push("checked" + ":" + oldForm[i].checked);
}

}

console.log(OnewForm);
</code></pre>

<p>Now I'm going to have put an extra for loop in there aren't are, which is where I'm confusing myself. </p>

<p>I think I just need a break</p>
