let url = 'api url';
const players = [];
fetch(url)
.then(response => response.json())
.then(data => players.push(data.included));
console.log(players);
I am using an api to view players on a server. My output:
https://imgshare.io/image/NyvUN5
I want to display all the name value of all current players. the number of objects in this array can be different at any time.