データが未定義であるため、配列で['productId']を実行できないと思いますが、jsonでこの構造が必要だと思います。いくつかのバリエーションを試しましたが、必要なものはありませんでした。 ajax経由でjsonを送信します。
jQuery(':checked').each(function(i){
data[i]['productId'] = jQuery(this).parent().find('.productId').val();
jQuery(this).parent().find('.attrGrp').each(function(j){
data[i]['attrGrps'][j]['uid'] = jQuery(this).find('.active').attr('id');
data[i]['attrGrps'][j]['amount'] = jQuery(this).parent().find('.amount').val();
});
});
jQuery.post(newSession, {json: data.serializeArray()});
それを行うためのより良い方法はありますか?またはどうすればそれを機能させることができますか?感謝するのを手伝ってください;/