Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to parse a json file typescript

interface MyObj {
    myString: string;
    myNumber: number;
}

let obj: MyObj = JSON.parse('{ "myString": "string", "myNumber": 4 }');
console.log(obj.myString);
console.log(obj.myNumber);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #parse #json #file #typescript
ADD COMMENT
Topic
Name
8+7 =