I would like to pass dictionary from AJAX to the controller
so where I go trough the all input element I would like to create dictionary<element.name as TKey, element.value as TValue>
How its that possible?
controller
[HttpPost]
public ActionResult SearchResult(int reportId, Dictionary<string, object> elementValue)
js
$("#btnSearch").click(function() {
  var reportId = $(this).data("id");
  var elementValues = {};
  $("#pnlFilter :input").each(function() {
    if ($(this).attr("type") === "checkbox") {
      elementValues = {
        "key": this.name,
        "value": $(this).is(":checked")
      };
      //elementValues.push(this.name + "-" + $(this).is(":checked"));
    } else {
      elementValues = {
        "key": this.name,
        "value": this.value
      };
      //elementValues.push(this.name + "-" + this.value);
    }
  });
  alert(elementValues);
  $.ajaxSetup({
    cache: false
  });
  $.ajax({
    type: "POST",
    url: "/Report/SearchResult",
    contentType: "application/json; charset=utf-8",
    data: JSON.stringify({
      reportId,
      elementValues
    }),
    dataType: "json",
    success: function() {
      var url = "/Report/EditFilters?reportId=" + reportId;
      $("#pageContent").load(url);
    }
  });
});