I need to get unique id and map it to value from array input using jquery/javascript
HTML
<input type="text" name="parameter['abc']" value="first value">
<input type="text" name="parameter['zxv']" value="second value">
Required output
[
'abc' : 'first value'
'zxv' : 'second value'
]
My attempts: managed to get values, but not indexes.
$('input[name^="parameter"]').map(function(){return
$(this).val();}).get();