title: Ascending or descending order of array of object in angular 10?
body: <pre><code>this.tripDetails= [
                {
                  &quot;vehicleNumber&quot;: &quot;TN 47 GR 3679&quot;,
                  &quot;adminVehicleDTO&quot;: [
                    {
                      &quot;tripId&quot;: 107,
                      &quot;id&quot;: 1176,
                      &quot;vehicleNumber&quot;: &quot;TN 47 GR 3679&quot;,
                      &quot;nominalType&quot;: &quot;income&quot;,
                      &quot;typeOfService&quot;: &quot;REGULAR&quot;,
                      &quot;amount&quot;: 250.0,
                      &quot;vehicleId&quot;: 1,
                      &quot;adhocVehicleId&quot;: null,
                      &quot;reason&quot;: &quot;Trip Income&quot;,
                      &quot;reasonId&quot;: 71,
                      &quot;description&quot;: null,
                      &quot;remarks&quot;: null,
                      &quot;deleteFlag&quot;: false
                  }]
              },
                {
                  &quot;vehicleNumber&quot;: &quot;KL 34 CV 6296&quot;,
                  &quot;adminVehicleDTO&quot;: [
                     {
                      &quot;tripId&quot;: 104,
                      &quot;id&quot;: 1165,
                      &quot;vehicleNumber&quot;: &quot;KL 34 CV 6296&quot;,
                      &quot;nominalType&quot;: &quot;income&quot;,
                      &quot;typeOfService&quot;: &quot;REGULAR&quot;,
                      &quot;amount&quot;: 0.0,
                      &quot;vehicleId&quot;: null,
                      &quot;adhocVehicleId&quot;: 32,
                      &quot;reason&quot;: &quot;Trip Income&quot;,
                      &quot;reasonId&quot;: 71,
                      &quot;description&quot;: null,
                      &quot;remarks&quot;: null,
                      &quot;deleteFlag&quot;: false
                  }]
              }, 
                {
                  &quot;vehicleNumber&quot;: &quot;AP 06 DE 4089&quot;,
                  &quot;adminVehicleDTO&quot;: [
                    {
                      &quot;tripId&quot;: 106,
                      &quot;id&quot;: 1175,
                      &quot;vehicleNumber&quot;: &quot;AP 06 DE 4089&quot;,
                      &quot;nominalType&quot;: &quot;income&quot;,
                      &quot;typeOfService&quot;: &quot;REGULAR&quot;,
                      &quot;amount&quot;: 0.0,
                      &quot;vehicleId&quot;: 4,
                      &quot;adhocVehicleId&quot;: null,
                      &quot;reason&quot;: &quot;Trip Income&quot;,
                      &quot;reasonId&quot;: 71,
                      &quot;description&quot;: null,
                      &quot;remarks&quot;: null,
                      &quot;deleteFlag&quot;: false
                  }]
              }]
  </code></pre>
  <p>This is the response from API and I want to make it either in ascending or descending order based on <strong>vehicleNumber</strong> in angular typescript for a purpose. I tried many things but nothing helped me. if possible suggest some ideas to try this. Thanks</p>