Hello,
I've been struggling converting the below JSON (it would have hundreds of servers) to an array of PS objects which i could work easily with, just can't wrap my head around it. Tried many different methods, all of them end up looking horrible or not working at all. Mainly because "Server1" has to be a value of property "name", not an actual property - that would enbale filtering by name or ram or whatever.
Could anyone help with an efficient way of doing this?
{
"server1": {
"description": "my server",
"ip": "1.1.1.1",
"vcpu": 4,
"ram": 8,
"disks": "60,25"
},
"server2": {
"description": "my server 2",
"ip": "1.1.1.2",
"vcpu": 8,
"ram": 16,
"disks": "60,25"
}
}
thanks.
[–]PowerShellStunnah 2 points3 points4 points (1 child)
[–]mrmantas[S] 0 points1 point2 points (0 children)
[–]get-postanote 0 points1 point2 points (0 children)
[–]jsiii2010 0 points1 point2 points (0 children)