JSFiddle - React, Tailwind, and code Playground

JavaScript

var orcs = [{
    name: 'Orgoth',
    strength: 9001,
    weapons: ['Bone ax', 'Mace of Strength']
}, {
    name: 'Blaroguhh',
    strength: 500,
    weapons: ['Cheeseburger', 'Spear of the Hut']
}, {
    name: 'Mark',
    strength: 543,
    weapons: ['Ax of Defense', 'Dagger', 'Sword']
}]
var length = Math.max.apply(Math, orcs.map(function (o) {
    return o.weapons.length;
}));
var obj = orcs.find(function (x) {
    return x.weapons.length == length;
}); // this will return find object
var objList = orcs.filter(function (x) {
    return x.weapons.length == length;
}); // this will return mutiple object
console.log(obj);
console.log(objList);
console.log(length);