const n = this.prac
const x = this.oa
console.log(x)
console.log(n[0].x)
So n stores data from a JSON file with columns like Organizations, Title etc.
oa will have a value given as input by the user. Let's suppose user inputs Organizations
I want to print n[0].x i.e n[0].Organizations
but when I do console.log(n[0].x)
it print undefined
On the other hand console.log(n[0].Organizations)
works fine.
What am I doing wrong? Can I not use x instead of Organizations?