Json value in Null hot to catch Javascript exception
just add a test
/* ------
var
data = {"home":"1234","room": null},
h = (data.home) ? data.home : '',
r = (data.room) ? data.room : 0;
------ */
var
data = {"home":"1234","room": null},
h = data.home || '',
r = data.room || 0;
console.log('h=',h);
console.log('r=',r);