JSON output different from the output of group object

Hello,
I am trying to get Process name and process Memory usage through powershell comamnd
get-process | Group-Object -Property ProcessName |
Format-Table Name, @{n=‘Mem (KB)’;e={‘{0:N0}’ -f (($_.Group|Measure-Object WorkingSet -Sum).Sum / 1KB)};a=‘right’} -AutoSize

But when i pipe it with ConvertTo-Json the output is different.
I want the output in exact same way(Name and Mem (KB)) as it displays on screen but in json format.
Kindly help

Can be solved using

Get-Process | Group-Object -Property ProcessName |Select-object Name, @{n=‘Mem’;e={(($_.Group|Measure-Object WorkingSet -Sum).Sum / 1KB)};}|ConvertTo-Json