How can I prevent releasing data if two attributes are empty?
const fork = [
{ from: 'client', msg: null, for: null },
{ from: 'client', msg: '2222222222222', for: null },
{ from: 'server', msg: 'wqqqqqqqqqqqq', for: 'data/64.....' }
];
console.log(message)
These examples show three entries that are consistently updated. However, there are more entries like these.
I'm looking to only send data if both attributes are not empty, and avoid sending any values that are null.
const fork = [
{ from: 'client', msg: null, for: null }, // remove entire line
{ from: 'client', msg: '2222222222222', for: null }, // remove 'for'
{ from: 'server', msg: null, for: 'data/64.....' } // remove 'msg'
];
console.log(message)