Match the Array and Array with Dictionary using Javascript

“fruits” is an array variable. It contains 4 fruits name. “list” is an array variable but contains the 4 number of dictionary. Checking whether a value exists in an array or not which using below code to achieve this. var fruits = [‘apple’, ‘banana’, ‘mango’, ‘guava’]; var list = [ {name:’apple’, category: “fruit”, price: 1.22 },…