javascript - Backbone syphon to get array of objects -
i have following html code
<div style="display: none"> <input type="text" name="typeid" id="wiz-typeid" value="<%= typeid %>"/> <input type="text" name="dealer" id="wiz-dealer-descr" value="<%= dealer %>"/> <input type="text" name="player" id="wiz-player-descr" value="<%= player %>"/> </div>
when backbone syphon, gives me json in following format :
"typeid": "dealer": "player":
i want in format :
"configutation": { "typeid": "dealer": "player": }
how encode name tags in html backbone.syphon.serialize
gives json in required format
<div style="display: none"> <input type="text" name="configuration[typeid]" value="<%= typeid %>"/> <input type="text" name="configuration[dealer]" value="<%= dealer %>"/> <input type="text" name="configuration[player]" value="<%= player %>"/> </div>
this serialize variables inside parent object