title: Sort multiple list inside List of objects with the same order of the first list
body: <p>I Have this List of objects containing two lists of strings, that are linked I want to order the two lists <code>valeurs</code> and <code>ProductUid</code>
  depending on the order of valeurs.</p>
  <p>listProducts:</p>
  <pre><code>[
      {
          &quot;groupBy&quot;: &quot;coloris&quot;,
          &quot;valeurs&quot;: [
              &quot;Beige&quot;,
              &quot;Gris clair&quot;,
              &quot;Anthracite&quot;,
              &quot;Beige&quot;,
              &quot;Augusta&quot;,
              &quot;Venezia&quot;
          ],
          &quot;ProductUid&quot;: [
              &quot;TEST1&quot;,
              &quot;TEST2&quot;,
              &quot;TEST3&quot;,
              &quot;TEST4&quot;,
              &quot;TEST5&quot;,
              &quot;TEST6&quot;
          ]
      },
      {
          &quot;groupBy&quot;: &quot;ref_commercial&quot;,
          &quot;valeurs&quot;: [
              &quot;29245&quot;,
              &quot;51625&quot;,
              &quot;25269&quot;,
              &quot;29245&quot;,
              &quot;72585&quot;,
              &quot;72584&quot;
          ],
          &quot;ProductUid&quot;: [
              &quot;TEST1&quot;,
              &quot;TEST2&quot;,
              &quot;TEST3&quot;,
              &quot;TEST4&quot;,
              &quot;TEST5&quot;,
              &quot;TEST6&quot;
          ]
      }
  ]
  </code></pre>
  <p>So the final result will be like this.</p>
  <p>SortedResult:</p>
  <pre><code>    [
      {
          &quot;groupBy&quot;: &quot;coloris&quot;,
          &quot;valeurs&quot;: [
              &quot;Anthracite&quot;,
              &quot;Augusta&quot;,
              &quot;Beige&quot;,
              &quot;Beige&quot;,
              &quot;Gris clair&quot;,
              &quot;Venezia&quot;
          ],
          &quot;ProductUid&quot;: [
              &quot;TEST3&quot;,
              &quot;TEST5&quot;,
              &quot;TEST1&quot;,
              &quot;TEST4&quot;,
              &quot;TEST2&quot;,
              &quot;TEST6&quot;
          ]
      },
      {
          &quot;groupBy&quot;: &quot;ref_commercial&quot;,
          &quot;valeurs&quot;: [
              &quot;25269&quot;,
              &quot;29245&quot;,
              &quot;29245&quot;,
              &quot;51625&quot;,
              &quot;72584&quot;,
              &quot;72585&quot;
          ],
          &quot;ProductUid&quot;: [
              &quot;TEST3&quot;,
              &quot;TEST1&quot;,
              &quot;TEST4&quot;,
              &quot;TEST2&quot;,
              &quot;TEST6&quot;
              &quot;TEST5&quot;,
          ]
      }
  ]
  </code></pre>
  <p>What I already did is</p>
  <p>While creating the listProduct</p>
  <pre><code>var result = lProd.SelectMany(x =&gt; x.Caracteristiques.Distinct(), (parentObj, childnum) =&gt;
  new
  {
      parentObj,
      childnum
  })
  .GroupBy(x =&gt; x.childnum.nom)
  .Select(x =&gt; new 
  {
  groupBy = x.Key,
  valeurs = x.Select(z =&gt; z.childnum.valeur).OrderBy(q =&gt; q), // Sort List Valeurs
  ProductUid = x.Select(z =&gt; z.parentObj.ProductUid), // Want to do the same sort here
  }).Where(sid =&gt; OrdredList.Any(si =&gt; si == sid.groupBy))
  .OrderBy(x =&gt; OrdredList.IndexOf(x.groupBy));
  </code></pre>
  <p>I was able to sort the <code>valeurs</code> list but couldn't find a way to use the same sort on the productUID,</p>
  <p>Is there a way to do it please ?</p>