The simple name/value pairs that form submission is organized in are
sufficient for expressing data structures of any complexity.
Multidimensional keys like (name, key) in your example can be expressed
through combined names:
<input type="text" name="quantity:{id_value_here}" value="">
Of course, it's how I usually do this :) But I would not be against some common
specified approach - especially taking into consideration some restriction on
'name' symbolset (there are much less restrictions on 'value' symbolset)