title: Dynamic json field schema with data mapping using C#
body: <p>I get this type of JSON data from Web API:</p>
  
  <pre><code>Data: {
    FromDate: "2016-03-01",
    Comment: "Bla bla",
    ...
  },
  FieldInfo: {
    Items: [
    {
      Id: "FromDate",
      Required: true,
      DataType: "date"
    },
    {
      Id: "Comment",
      Required: true,
      DataType: "string"
    },
    ...
    ]
  }
  </code></pre>
  
  <p>I need to serialize it to C# object and transform it to different representaion which should look something like this:</p>
  
  <pre><code>  {
      FieldInfo: {
        Items: [
        {
          Id: "FromDate",
          Required: true,
          DataType: "date",
          Value: "2016-03-01"
        },
        {
          Id: "Comment",
          Required: true,
          DataType: "string"
          Value: "Bla bla"
        },
        ...
        ]
     }
  </code></pre>
  
  <p>Basically map field values to its schema so it will not be separated.
  Of course easiest way its just write a lot of if's for each field, which will not be very elegant solution and even not doable if we take into account that field schema and fields are dynamic so they can change. Property which I can rely on is Id in FieldInfo Item schema which should be a property name in Data object. One of the solution might be to use reflection in order to map Id value to property name in C# object representation. My question maybe there is another solution(s) to this problem or some tools which can help me in achieving this goal? </p>