I need to delete, in nodeJS, all of the keys which have two points or has white space or is empty.
I have this JSON:
{
"cmd": [
{
"key:test": "False",
"id": "454",
"sales": [
{
"customer_configuration": {
"key:points": "test value",
"": "empty key",
"some_field": "test"
}
}
]
}
]
}
target JSON:
{
"cmd": [
{
"id": "454",
"sales": [
{
"customer_configuration": {
"some_field": "test"
}
}
]
}
]
}
How can I do this?