This code returns keys and values from my dict
$.map(dict, function (value, key) {
console.log(key, value);
});
output:
0 ["19,0,0,0", "23,0,0,0", "21,0,0,0", "22,0,0,0", "20,0,0,0"]
1 ["68,0,0,0", "69,0,0,0", "70,0,0,0", "71,0,0,0", "72,0,0,0", "73,0,0,0", "74,0,0,0", "75,0,0,0"]
2 ["115,0,0,0", "114,0,0,0"]
So, in my opinion it is a Dictionary <string,string[]>
I want to pass the dict to controller
$.ajax({
url: '/Home/SomeAction',
type: 'GET',
data: { categoryId: categoryId, traitValues: dict }
});
public ActionResult SomeAction(int categoryId, Dictionary<string,string[]> traitValues){...}
And here is a problem. In controller key dictionary is ok (0,1,2). But value is empty.
So how I can pass my dict from js to controller?