title: how to convert Enum definition to JavaScript object (json)
body: <p>I also checked this <a href="https://stackoverflow.com/questions/2441290/javascriptserializer-json-serialization-of-enum-as-string">post</a> but it gives me same result.
  enum definition:</p>
  
  <pre><code>    public enum myEnum
          {
              variable1 = 1,
              variable2 = 25,
              variable3 = 35
          }
  </code></pre>
  
  <p>Here's what I tried:</p>
  
  <pre><code>var myJsObject= @Html.Raw(JsonConvert.SerializeObject(Enum.GetValues(typeof(myEnum)), new Newtonsoft.Json.Converters.StringEnumConverter()));
  </code></pre>
  
  <p>and this is what it returns:</p>
  
  <pre><code>["variable1","variable2","variable3"]
  </code></pre>
  
  <p>Expected result:</p>
  
  <pre><code>{"1":"variable1","25":"variable2","35":"variable3",}
  </code></pre>
  
  <p>How can I achieve this?</p>