I need to start from a set of objects, define a single object, with the most used data among the javascript object collection informed.
Example of set of objects:
[{
name: "Pedro",
product: "Caneta"
}, {
name: "Ana",
product: "Caderno"
}, {
name: "Maria",
product: "Boracha"
}, {
name: "Pedro",
product: "Caneta"
}, {
name: "Pedro",
product: "Caneta"
}]
Single object with the most used values in the above collections:
{
name: "Pedro",
product: "Caneta"
}
That’s what I need, based on the javascript collections array you can see that the most used information for the fields (name and product), were name: "Pedro"
and product: "Caneta"
.
That kind of analysis I need.
What function or how could I do this using tensorflow javascript, if you have any examples I’m very grateful, because I’m new to this.