title: Cast dynamic to specific type
body: <p>I am retrieving JSON with different object type in one part.
  I made this part as dynamic.</p>
  
  <p>I need to get data from this object so I created class which looks the same as the dynamic data like below:</p>
  
  <pre><code>public class SpecificObject1
  {
      public string Title{get; set;}
      public object[] ViewElements{get; set}
      public object AnyAttributes{get; set;}
  }
  </code></pre>
  
  <p>Here is how I want to convert it to this specific object:</p>
  
  <pre><code>  var @switch = new Dictionary&lt;Type, Action&gt; {
                  { typeof(x), () =&gt;  jsonObj.Some = jsonObj.Some as SpecificObject1},
                  { typeof(y), () =&gt;  ......}
              };
  </code></pre>
  
  <p>Casting with <code>as</code> returns null. </p>
  
  <p>EDIT:
  Changed properties to real one</p>
  
  <p>dynamic contains:</p>
  
  <pre><code>AnyAttributes: {object}
  Title: "title"
  ViewElements: object[0]
  </code></pre>