I have an array of nested objects.
const arr = [
{
id: 1,
name: "java",
answers: {
q1: "ex",
q2: "ex",
q3: "ex",
},
},
{
id: 2,
name: "css",
answers: {
q1: "ex",
q2: "ex",
q3: "ex",
},
},];
For example : I want to access and diplay "q1" from the first "answer" object . How can I do that?