I am using RestAPI access to azure. I am getting a list of changesets for a build ID.
I would like to sort the object type with increasing Changeset number.
The type I receive for $changeset.GetType():
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True False PSCustomObject System.Object
This is the output $changeset:
count value
----- -----
50 {@{id=68.......
Therefore, I checked the type of value $changeset.value.GetType():
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True True Object[] System.Array
And afterwards I checked the type of an element:
$changeset.value[0].GetType():
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True False PSCustomObject System.Object
I did try Sort-Object with ascending and descending, but it does not change the order:
$changeset = $changeset | sort-object { $_.value.id } -desc
I would like to keep the structure as it is to not break something. There are lots of properties within the component.
id? Are you able to export the object usingExport-CliXmland share it with us?