How to serialize as an array of objects from multiple fields in jQuery?
- by teebot.be
Hi,
I'm using jQuery to dynamically add new divs containing a few fields.
I'm adding new tunes in this example of output:
<div id="uploadedTunes">
<div class="tune">
Title:<input type="text" name="Title">
Length:<input type="text" name="Length">
</div>
<div class="tune">
Title:<input type="text" name="Title">
Length:<input type="text" name="Length">
</div>
</div>
Is there a way to serialize only the fields in the div uploadedTunes (and not the whole form) ?
And how do I serialize this so I have an array like this:
uploadedTunes{
tune {
Title="highway to hell",
Length="03:01"
}
}
Thank you for your help or clues!