title: Post Json Dictionary to the controller
body: <p>I have the following code in my jQuery file</p>
  
  <pre><code>var bases = {};
  for (var j = 0; j &lt; selectedVariants.length; j++) {
       bases[selectedVariants[j].BId] = selectedVariants[j].CId;
  }
  </code></pre>
  
  <p>and i am getting some data in bases dictionary now</p>
  
  <p>and my question here is how do I pass this bases dictionary to controller through ajax call.</p>
  
  <p>I tried the following thing but bases count in the controller  is coming as ZERO</p>
  
  <pre><code>$.ajax({
      url: $.url('~/TUP/Tflow'),
      type: 'POST',
      data: { baseDetails: JSON.stringify(bases)},
      async: true,
      cache: false,
  });
  </code></pre>
  
  <p>Here when I see in my controller ... bases count is coming as ZERO </p>
  
  <p>Please help me on this</p>
  
  <p>Controller :</p>
  
  <pre><code>[HttpPost]
  public JsonResult Tflow(JsonFileContentInputs basedetails)
  {   
      //some code   
  }
  </code></pre>
  
  <p>and my model :</p>
  
  <pre><code>[ModelBinder(typeof(JsonModelBinder))]
  [DataContract]
  public class JsonFileContentInputs
  {
      [JsonProperty(PropertyName = "basedetails")]
      [DataMember]
      public Dictionary&lt;string, string&gt; basedetails { get; set; }              
  }
  </code></pre>