Skip to content

Tag: object

How can I find objects with same keys values in array?

I have an array of objects that looks like this: And I need to find objects with the same type to merge fields key in them, like this: My plan was to filter through the array, but my problem is that I don’t know which type will send me API, so filtering by item.type wouldn’t work for me. Answer If

Languages Statistic

I have to implement the “getLanguagesStatistic” function, which will help the IT magazine summarize 2019 in terms of the popularity of programming languages. As input, the function receives an array of user reviews. You need to return an object in the format {languageName: count, anotherLanguageNa…