{
"top": [{
"language": "English",
"value": ""
}, {
"language": "German",
"value": "hASTA"
}],
"bottom": [{
"language": "English",
"value": "jfgfjg"
}, {
"language": "German",
"value": "fkjhf"
}],
"In": "12 am",
"Out": "3 am",
"Type": ""
}
Hi guys, I want to remove the keys that have empty values, I tried using filter but that showed me error in google sheets.
I want to send only the data to API that has values.
In this case, for
language:german, the value is empty so i Would skip sending top. to the API.
the json to be sent:
{
"bottom": [{
"language": "English",
"value": "jfgfjg"
}, {
"language": "German",
"value": "fkjhf"
}],
"In": "12 am",
"Out": "3 am"
}
code used:
apidata = userdata.filter(function(x) { return x !== "" });
Can you please guide me on how to do this?
.filter()toparray removed from the object?