title: Deserialize json string to object in c# in Key value pair (Comma separated values)
body: <p>I have below json in string as parameter to a WebMethod.</p>
  
  <p>How can I deserialize in such a way that value comes in Key value pair.</p>
  
  <p>Json String Parameter:</p>
  
  <pre><code>["Ref No,0","Date,0","Amt,0","Sender Name,0","Sender Add,0","Beneficiary Name,0","Beneficiary Add,0","Phone,0","Secret Code,0","Secret Ans,0","Preferred Id,0"]
  </code></pre>
  
  <p>WebMethod:</p>
  
  <pre><code>[System.Web.Services.WebMethod]
  public static string SaveMappings(string mappingData)
  {
      //string str = "{\"Arg1\":\"Arg1Value\",\"Arg2\":\"Arg2Value\"}";
      //JavaScriptSerializer serializer = new JavaScriptSerializer();
      //object obj;
      //var data = serializer.Deserialize(mappingData,);
  
      var data = mappingData.ToArray();
      if (data != null)
      {
  
      }
  
      var d2 = mappingData.Split(',');
      if (d2!=null)
      {
  
      }
  
      return mappingData;
  }
  </code></pre>