"resolveJsonModule": true,
"esModuleInterop": true,
import {default as a} from "config.json";
config.targetKey
// this requires `"resolveJsonModule": true` in tsconfig.json
import {default as a} from "a.json";
a.primaryMain
interface MyObj {
myString: string;
myNumber: number;
}
let obj: MyObj = JSON.parse('{ "myString": "string", "myNumber": 4 }');
console.log(obj.myString);
console.log(obj.myNumber);