Loop through array of objects if value exists return another value

welcome to shbcf.ru