questions={
1:{
quest: "blah blah blah",
answers: ["1812", "1837", "1864", "1899"],
correct: "1837"
},
2:{
quest: "fasfa asf",
answers : ["2","3","4","5"],
correct : "3"
}
}
For example, I know value of 1
. I need to get that object's name with its value.
var x = {quest: "blah blah blah",
answers: ["1812", "1837", "1864", "1899"],
correct: "1837"}
returnNameOf(x)
expected output 1
;