Flatten and restructure linq in Asp.Net : <p>I want to restructure the original <strong>json data with a list of trips</strong> and <strong>return a converted and flatten list</strong> based on the <strong>boarding points</strong> and the <strong>dropping points</strong> using <strong>Linq</strong>. Below is the example of original json data and the result that I want. How do I do that? Please help. Thanks.</p>

<p>Original Json:</p>

<pre><code>[{
     tripId: 1,
     name: "abc express",
     boardingTimes: [
     {
         time: 1200,
         id: 12,
         name: "A"
     },
     {
         time: 1215,
         id: 14,
         name: "B"
     }
     ],
     droppingTimes: [{
         time: 1400,
         id: 15,
         name: "C"
     }]
}]
</code></pre>

<p>Result: </p>

<pre><code>[{
         tripId: 1,
         name: "abc express",
         boardingTimes: 
         {
             time: 1200,
             id: 12,
             name: "A"
         },
         droppingTimes: {
             time: 1400,
             id: 15,
             name: "C"
         }
},
         tripId: 1,
         name: "abc express",
         boardingTimes: 
         {
             time: 1215,
             id: 14,
             name: "B"
         },
         droppingTimes: {
             time: 1400,
             id: 15,
             name: "C"
         }
]
</code></pre>
