how to format json file in vs code

JavaScript
On Windows Shift + Alt + F.
On Mac Shift + Option + F.
Source

Also in JavaScript: