title: Mapping To a Property from a Dictionary Entry
body: <p>I have two objects. ObjectA contains 2 string properties, the other ObjectB contains 3 string properties and 2 dictionary properties. I am using automapper to map from ObjectB a dictionary value based on a key to a property in ObjectA.</p>
  
  <p>I am trying to map A.payload["reportId"] to B.ReportID</p>
  
  <p>Not really sure what I am missing here.</p>
  
  <pre><code>public class ObjectA
  {
      public string customerId { get; set; }
      public string consumerId { get; set; }
      public string eventType { get; set; }
      public string eventId { get; set; }
      public IDictionary&lt;string, string&gt; payload { get; set; }
      public IDictionary&lt;string, string&gt; webhookData { get; set; }
  
  }
  
  public class ObjectB
  {
      public string CustomerID { get; set; }
      public string ReportID { get; set; }
  }
  
  CreateMap&lt;ObjectA, ObjectB&gt;()
                  .ForMember(desc =&gt; desc.CustomerID, opt =&gt; opt.MapFrom(src =&gt; src.customerId))
                  .ForMember(desc =&gt; desc.ReportID, opt =&gt; opt.MapFrom(src =&gt; src.payload.ContainsKey("reportId") ? src.payload["reportId"] : ""));
  </code></pre>
  
  <p>I get the following error:</p>
  
  <blockquote>
    <p>Unmapped members were found. Review the types and members below. Add a
    custom mapping expression, ignore, add a custom resolver, or modify
    the source/destination type For no matching constructor, add a no-arg
    ctor, add optional arguments, or map all of the constructor parameters
    AutoMapper created this type map for you, but your types cannot be
    mapped using the current configuration. ObjectA -> ObjectB
    (Destination member list) ObjectA -> ObjectB (Destination member list)
    Unmapped properties: ReportID</p>
  </blockquote>