I'm using JQuery map function to get an array of inputs' values:
var inputs = $("[id^='field']");
var values = inputs.map(function () {
return $(this).val();
}).get();
I would like to get an associative array of [id, value]:
{
id1: value1,
id2: value2
}