참고 : http://www.json.org/js.html
참고2 : http://msdn.microsoft.com/ko-kr/library/cc836459(v=vs.94).aspx
<script type="text/javascript">
function test()
{
var jsontext = '{"name":"revfactory","age":"30","phone":["02-000-0000","010-000-0000"]}';
var obj = JSON.parse(jsontext);
alert(obj.phone[1]);
var newJsontext = JSON.stringify(obj);
alert(newJsontext);
}
</script>
'프론트기술 > JavaScript' 카테고리의 다른 글
Json - Object 간 변환 (0) | 2013.05.28 |
---|---|
JQuery 객체에 메서드 추가하기 (0) | 2013.04.11 |
JQuery -> Ajax 정리 (0) | 2012.05.03 |