Object Access Example

JavaScript

let data = {
	vocabulary: {
  	lection1: [
    	'pig', 'sheep', 'cookie monster'
    ]
  }
}

let section = "vocabulary";
let lection = "lection1"

alert(data[section][lection])