json 값 php로 출력 질문드립니다.
본문
안녕하세요.
$.ajax({
url : 'http:/ABC.COM/abcdefg'
,type : 'GET'
,cache : false
,contentType : 'application/json; charset=utf-8'
,dataType : 'json'
,success : function(result) {
//alert(result);
console.log(result);
}
,error:function(request,status,error){
alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
}
});
위와 같이 URL을 GET으로 호출해서 다음과 같은 값을 받았습니다.
result:
country: "0"
created: "2020-05-15T02:22:55+09:00"
credit: "0"
dirty: "-"
nick: "abcdefg"
status: "active"
id: "abcdefg"
updated: "0001-01-01T00:00:00Z"
console.log에 이렇게 나오는데요
이게 값을 불러온게 맞나요? 불러온것이 맞다면 위 값중에 nick인 abcdefg만 출력하려면 어떻게 해야되나요?
답변을 작성하시기 전에 로그인 해주세요.