I want to create a new variable that will count all the names and them as a assignments says but I am kind of stuck.
I have an array with names.
names = [Jan, Jan, Jana]
I would like to count these names, which is quite easy but what I am struggling with is putting them as the assignment says below.
const dtoOut = {
chartData: {
all: [
{label: "Jan", value: 2},
{label: "Jana", value: 1},
any help?