my Json-file is a simple Object with 2 arrays:
{ 
"key1": ["a", "b", "c"],
"key2": [ "d", "e", "f"] 
}
in Javascript I'm using fetch to get the data. To use the data I'm pushing it into an array
const jsonData = '/things.json';
const myArray = [];
fetch(jsonData)
.then(answer => answer.json())
.then(data => myArray.push(data))
console.log(myArray); //this gives me a nested array
console.log(myArray[0]); //undefined 
putting myArray through a loop also gives me an //undefined
using the spread syntax or concat gives me //Found non-callable @@iterator
How can I get the content of that array?



console.logs are occuring before your.then. Move them inside of the function being passed to .then and you should be fine.