how to remove key and value that are undefined from object?
for example I have
var x = {
 firstname: undefined,
 lastname: 'blabla'
}
how to get object without undefined? in the most efficient and quick way?
the result should be:
x = {
 lastname: 'blabla'
}
 
    