There are two dropdowns (categories and products)
First dropdown
C1
C2
C3
C4
Second dropdown is dynamic dropdown and it gets populated based on whats selected in first dropdown
For C1
P1A, P1B, P1C would get populated in second dropdown
For C2
P2A,
For C3
P3A, P3B, P3C
For C4
P4A, P4B
I want to give user the ability to select multiple combinations of categories and products
So, if he selects C1 and then P1A/P1B, C3 and then P3B
I want to send to the server on submit the selected key value pairs
(C1, P1A),
(C1, P1B),
(C3, P3B)
OR
(C1->[P1A,
P1B]
,
C3-> [P1A])
Any ideas?