I have this PSObject (from XML):
bool : {IsActive, ShowOnB2C, ShowOnB2B, IsWebNews} str : {id, ProductId, GroupName, Unit...} int : {ProductIdNumeric, Prices_SalesOne, Prices_Treater, Prices_B2C...} arr : {EnvironmentBrands, Catalogs, NavisionLevels} long : long
I would like to iterate over properties without using property names like bool .
I tried to index the object as follows:
$document[0]
But it does not give anything, but it also does not cause any errors.
Select-Object , but I have to use property names, and I don't want this.
$documents | Select-Object bool,str
ForEach does not ForEach over properties.
$documents | ForEach { $_.name }
returns doc, and this is the name of the tag (XML) containing bools, ints and strings.
source share