Hacker News new | ask | show | jobs
by majkinetor 713 days ago

    $h=@{x=1; y=2}; $h + @{z=3} | ConvertTo-Json

    {        
      "y": 2,
      "z": 3,
      "x": 1 
    }
You can even use [ordered]$h to make keys not go random place.