<script>
const STUDENT = [{
"name":"Hector",
"age":"31",
"height":181,
"job":"student",
"main":"java script",
"sub":"server",
},
{
"name":"Lucy",
"age":"32",
"height":160,
"job":"student",
"main":"java script",
"sub":"client",
}]
console.log(STUDENT[0].name);
console.log(STUDENT[0].age);
console.log(STUDENT[0].height);
console.log(STUDENT[0].job);
console.log(STUDENT[0].main);
console.log(STUDENT[0].sub);
console.log(STUDENT[1].name);
console.log(STUDENT[1].age);
console.log(STUDENT[1].height);
console.log(STUDENT[1].job);
console.log(STUDENT[1].main);
console.log(STUDENT[1].sub);
console.table(STUDENT);
console.log(STUDENT[0]['name']);
let asm = {}
loop_top : for(let i = 0; i < STUDENT.length;i++){
let values = Object.values(STUDENT[i]);
console.log(i);
for(let j = 0; j < values.length; j++){
if(values[j]==='Hector'){
asm = STUDENT[i];
break ;
}
}
}
console.log(asm);
</script>