retrieving data from an array code example
Example: retrieving data from an array
//In javaScript, when looking for one record in an array-object set up use .find() function
//Example if:
const Array = [Object1, Object2, Object3,........Objectn]
//where: Object = {property1: value1, property2: value2,.......,propertyn:valuen}
//use the followint syntax
const function = (parameter)=>{
const foundArray = array.find((array)=array.property==parameter);
console.log(`Value of the object ${parameter} is : ${foundArray.value})
};