I have following JSON element.
"myObj":[
{
"@type":"xzy",
"data" :"pqr"
}
]
I am accessing a value inside the array using the key as follows
var data = myNode.filter(x => x.@type=='xyz').map(y=>y.data)
But I canot do it becuase of the @
symbol in the key. I tried surrounding it with '
var data = myNode.filter(x => x.'@type'=='xyz').map(y=>y.data)
but again it fails. @
symbol is valid in JSON. So, I should be able to access it. How can I do this in Javascript? Appreciate your input