{
"isLoading":false,
"error":"",
"product":"manual-text",
"projectName":"",
"existingBrief":"",
"offlineData":{
"text":"qwdqdqwdwq",
"files":[]
},
"customerDetails":{
"name":"qwdqwdw",
"company":"qwdq",
"position":"dqdqw",
"email":"dqdd"
},
"profileObjectiveDetails":{
"objective":"",
"objectiveTargets":""
},
"entityCount":1,
"objectives":[],
"industries":"",
"chapters":[],
"chaptersUserSelection":[],
"chaptersChoices":[],
"pricing":{
"currency":"",
"options":[],
"selection":{
"token":"",
"expertise":"",
"deliveryKey":0
}
},
"dataGrid":[],
"target":"",
"geo":{
"type":"",
"regions":{},
"countries":[]
},
"finalNote":""
}
{
"product":"manual-text",
"offlineData":{
"text":"qwdqdqwdwq"
},
"customerDetails":{
"name":"qwdqwdw",
"company":"qwdq",
"position":"dqdqw",
"email":"dqdd"
},
"entityCount":1
}
function filter(val) {
if (!(val instanceof Object)) {
return val;
}
const filtered = Object
.entries(val)
.map(n => [ n[0], filter(n[1]) ])
.filter(n => n[1]);
return filtered.length
? val instanceof Array
? filtered.map(n => n[1])
: Object.fromEntries(filtered)
: null;
}