i was seeking for a solution like this in stackoverflow and in google but this is the idea
a = {
b: (conditionB? 5 : undefined),
c: (conditionC? 5 : undefined),
d: (conditionD? 5 : undefined),
e: (conditionE? 5 : undefined),
f: (conditionF? 5 : undefined),
g: (conditionG? 5 : undefined),
};
but i dont understand this... it doesnt work in nodejs i want to create an object a with many objects inside but if that objects are in the form send by the client