I have an object named "colors" which have keys like
{
"white":"#FFFFFF",
"black":"#000000",
"red":"FF0000"
}
In some of the conditions i want all colors except the "white" color
I have an object named "colors" which have keys like
{
"white":"#FFFFFF",
"black":"#000000",
"red":"FF0000"
}
In some of the conditions i want all colors except the "white" color
3
Answers
Typescript Version:
delete source["colourname"]
using the
filter
andreduce
you can filter out the result