I am working with two arrays
array1 = [
{name: "samsung", views: 1200},
{name: "apple", views: 200}
]
array2 = [
{name: "samsung-1234", views: 200},
{name: "apple-2332", views: 200},
{name: "samsung-6543", views: 400},
{name: "samsung-9876", views: 600}
]
I need to determine how many different types of samsung
and apple
there are in array2.
Your assistance with solving this problem is greatly appreciated. Thank you!