I have a specific model for my list, it looks like this:
Animal Model
id
name
age
gender
city
Within the animals[] = [];
array that I am working with, I need to remove the fields name, age, and gender
while keeping id and city
. How can I achieve this?
My Attempt:
import { pick, keys } from 'lodash';
this.animals = pick(this.animals, keys(['name,age,gender']));
Error Message Received:
[ts] Type 'PartialDeep' is not assignable to type 'Animal[]'. Property '[Symbol.unscopables]' is missing in type 'PartialDeep'.