$ERROR.Clear();
$records=ConvertFrom-Json '
[
{"101":"","102":"12000","103":"12000"},{"101":"","102":"12000","103":"12000"},{"101":"","102":"12000","103":"12000"},
{"101":"","102":"12000","103":"12000"},{"101":"","102":"12000","103":"12000"},{"101":"","102":"12000","103":"12000"},
{"101":"","102":"12000","103":"12000"},{"101":"","102":"12000","103":"12000"},{"101":"","102":"12000","103":"12000","104":999}
]
'
#json 集計等
$sum=$records|Measure-Object -Property "*" -Sum ;
ConvertTo-Json $sum
#jsonから名前(キー)を取得
$records | ForEach-Object{$_| Get-Member -MemberType Properties | Select-Object -ExpandProperty Name}| Sort-Object -Unique
0 件のコメント:
コメントを投稿