let payload = {
item1: ["value1", "value2", "value3"],
item2: [],
item3: ["value4", "value5"]
}
Object.entries(payload).forEach(([key, values]) => {
if (values.length === 0) {
// do this stuff
I'm getting an error that values is of type unknown. I'm not sure how to give it a type of array.
key will always be a string, and values will always be an array of strings.