js add property if not null code example
Example: add property with value in js
var myObject = {
sProp: 'some string value',
numProp: 2,
bProp: false
};
var myObject = {
sProp: 'some string value',
numProp: 2,
bProp: false
};