I want to replace every string in and number in an object with an empty string of empty number.
For example:
const test = {
a: "asdf",
b: 2,
c: [
{
lala: "more strings",
d: "saaa"
}
]
}
with
const test = {
a: "",
b: 0,
c: [
{
lala: "",
d: ""
}
]
}
I can't think of an easy way to iterate over all the values in the object/array recursively. Is there a library (maybe lodash) that does this already?