I have the following structure:
{
cp: {
id: 8,
login: "something@gmail.com",
name: "Yuri",
age: 19,
...
},
admin: {
id: 19,
login: "test",
password: "somehash",
...
}
}
I wish this object to have id
and login
properties only, like:
{
cp: {
id: 8,
login: "something@gmail.com"
},
admin: {
id: 19,
login: "test"
}
}
Is there way to do this using lodash
?
I have read this answer but I don't know how to do the same operations with my structure. Please, help.