interface MyObj { myString: string; myNumber: number; } let obj: MyObj = JSON.parse('{ "myString": "string", "myNumber": 4 }'); console.log(obj.myString); console.log(obj.myNumber);