My notes from ChatGPT: List of Cancer hospitals in India

Here is a list of some well-known cancer hospitals in India: Tata Memorial Hospital, Mumbai : One of the oldest and most reputed cancer hospitals in India, known for its comprehensive cancer care and research. All India Institute of Medical Sciences (AIIMS), New Delhi : AIIMS is a premier medical institute in India with a dedicated cancer treatment center that offers advanced care and research facilities. Adyar Cancer Institute, Chennai : Known for its expertise in cancer treatment and research, particularly in radiation oncology and surgical oncology. Rajiv Gandhi Cancer Institute and Research Centre, Delhi : A leading cancer hospital providing comprehensive cancer care with state-of-the-art facilities. Cancer Institute (WIA), Chennai : Founded by Dr. Muthulakshmi Reddy, it is one of the oldest cancer hospitals in India, known for its pioneering work in cancer treatment and research. Apollo Hospitals, Chennai : Part of the Apollo Group, it offers specialized cancer care across various

How to minify JSON in powershell?

 Recently, I had a requirement to minify json using powershell and I learnt that it is pretty simple and thought of adding it to my blog as well so that it can serve as future notes for me as well.

Here is my sample JSON

[
  {
    "name": "gaurav",
    "age": "32",
    "id": 1
  },
  {
    "name": "sunny",
    "age": "35",
    "id": 2
  }
]

Here is the powershell script:
$report = Get-Content './report.json' | Out-String
$minifiedJSON = (ConvertFrom-Json $report) | ConvertTo-Json -Compress;
Write-Host $minifiedJSON;
$minifiedJSON | Out-File -FilePath '.\minified.json'
Here is the output:
[{"name":"gaurav","age":"32","id":1},{"name":"sunny","age":"35","id":2}]