TIL 6월 17일 - JSON.parse()

BOHYEON SEO·2019년 6월 17일
1

TodayILearned

목록 보기
7/26
post-thumbnail

JSON.parse()

  • JSON.parse()는 JSON 데이터를 가진 문자열을 객체로 변환한다. (이를 역직렬화라고 한다)

  • 예시

var json = '{"result":true, "count":42}';
obj = JSON.parse(json);

console.log(obj.count);
// expected output: 42

console.log(obj.result);
// expected output: true

궁금증, 더 공부해볼 것들

profile
FE Developer @Medistream

0개의 댓글