I'm having troubles itinerating on a json, it looks like this:
{
"name":"Meeting 2021",
"translate": {"de":okay","fr":"okay2"}
}
I'm trying create a for on the translate key.
I tried the following but I end up splitting the strings letter by letter:
var arr = JSON.parse(responsex.translate);
arr.forEach(function (elementObject) {
var keys = Object.keys(elementObject);
keys.forEach(function (key) {
console.log(key + ':' + elementObject[key]);
})
});
I also tried doing a simple for but I'm getting undefined index. What exactly am I doing wrong? I'm simply trying to get the DE and FR values individually so I can make a simple html select.
Thank you!