I have object in js like this:
const Obj = [ {
propability: 0.5,
name: 'Item with propability 0.5%'
}, {
propability: 1,
name: 'Item with propability 1%'
}
];
Any one knowns how to create algorithm to this? Just simple code.
I want to return item by his propability.