-
-
Notifications
You must be signed in to change notification settings - Fork 0
filter
Aierse edited this page Oct 17, 2023
·
1 revision
Remove targets
import JSONExtend from "@aierse/json-extend";
const json =
{
id: "test",
password: "test",
phone: "010-1234-5678",
memo: "",
etc: undefined,
}
// Remove targets
json = JSONExtend.filter(json, [null, undefined, ""]);
/*
{
id: "test",
password: "test",
phone: "010-1234-5678",
}
*/