title: JSON string to object using Enums
body: <p>I have JSON string, something like:</p>
  
  <pre><code>{"1":{"1":"driver","2":"New York, NY"},"2":{"3":"male","2":"Alabama"}}
  </code></pre>
  
  <p>I have two enums:</p>
  
  <pre><code>public enum StoragePrimaryKeys
  {
      Login = 1,
      Account = 2
  };
  
  public enum StorageSecondaryKeys
  {
      JobTitle = 1,
      JobId = 2,
      JobLocation = 3,
      RenewDate = 4,
      ExpirationDate = 5
  };
  </code></pre>
  
  <p>How can I deserialize this JSON to an object?</p>
  
  <p>I thought to do the next thing:</p>
  
  <pre><code>var jss = new JavaScriptSerializer();
  
  Dictionary&lt;string, string&gt; sData = jss.Deserialize&lt;Dictionary&lt;string, string&gt;&gt;(value);
  
  string output = string.empty;
  
  
  
  foreach (KeyValuePair&lt;string, string&gt; entry in sData)
  {
      if (Convert.ToInt32(entry.Key) == StorageSecondaryKeys.JobTitle) {
  
      }
  
      output += "\n key:" + entry.Key + ", value:" + entry.Value;
  }
  </code></pre>
  
  <p>But maybe there is more efficient way?</p>
  
  <p><strong>I think It's a new question cause I have numbers in the keys that should be translated to the strings of the enums</strong></p>
  
  <p>Thanks.</p>