-
JAVASCRIPT JSON OBJECT NULL CHECK 자바스크립트 오브젝트 비어있는 지 확인 방법수상한 프로그래머/죽은 소스 살려내는 꾸르팁 2019. 9. 5. 09:22반응형
//빈 오브젝트 체크 (empty object check)
var objt = {}; //맴버가 없는 객체 리터럴
JSON.stringify(objt) == '{}'; // true
Object.keys(objt).length === 0; // true
//jQuery 빈 오브젝트 체크
jQuery.isEmptyObject(objt) // true
반응형'수상한 프로그래머 > 죽은 소스 살려내는 꾸르팁' 카테고리의 다른 글
자바스크립트 배열 특정 요소 삭제 javascript array delete object (4) 2019.10.02 자바스크립트 JAVASCRIPT Json Arry list 에서 특정문자 포함된 값 가져오기 (0) 2019.09.23 내 아이폰을 맥북에서 미러링 해주고 싶을때 팁 (0) 2019.07.23 크롬 개발자 도구에서 객체 복사하는 방법 (0) 2019.05.08 Eclipse에서 Resource is out of sync with file system. 발생시 대처 (0) 2019.05.03 댓글