Rubberduck-Debugging

json 배열 추가 본문

개발자/201801프로젝트_Hello,mind!

json 배열 추가

P缶 2019. 1. 21. 11:47

<!DOCTYPE html>

<html>

<body>


<p>Access an array value of a JSON object.</p>


<p id="demo"></p>


<script>


var login ={};

login.name = "member";

login['id'] = "mId3";



var data = {};

data['name'] = 'col';

data['message'] = '상담시작';

data['id'] = 'cId2';

//{name : 'col', message: '상담시작', id:'cId2'}


document.write(data.id);

document.write(login.name);


</script>


</body>

</html>