I have this json named test_json
and I need to get all the authors out of it.
{
name:'test',
content:
{
"dynamicVar1":
{
"author":'bla'
},
"also-DynamicButOther-123-Name":
{
"author":'bla2'
}
}
}
The problem is that since "dynamicVar1" and "also-DynamicButOther-123-Name" have changing names - I can't access author.
I've tried this, but it doesn't work and I don't know where to go from here.
for (let x in test_jason.content){
console.log(test_jason.content.x.author) //undefined
}