const getConfidence = (media) => {
    const best = Object.values(media)
        .filter((med) => med.found)
        .reduce((prev, current) => {
            return prev.metric > current.metric ? prev : current;
        });

    return best.confidence;
};

export default getConfidence;
