How to display data from json?

axios.get(`https://api.mojang.com/user/profiles/5dcafb2fbd764a858b253c22079ce358/names`)


You must send name and changedToAt one message.
[{"name":"jolinedecoste"},{"name":"MrZillaGold","changedToAt":1531733381000}]
March 19th 20 at 09:10
1 answer
March 19th 20 at 09:12
Solution
axios.get(`https://api.mojang.com/user/profiles/5dcafb2fbd764a858b253c22079ce358/names`)
.then((data) => {
 let message = ";
 for (let i = 0, l = data.length; i < l; ++i) {
 message += 'name:' + data[i].name + ', changedToAt: '+ data[i].changedToAt + '\n';
 } 
send(message);
});
If we assume changedToAt is missing, as undefinded replace with his word? - tristin_Halvorson42 commented on March 19th 20 at 09:15
@tristin_Halvorson42,
message += 'name:' + data[i].name + ', changedToAt: '+ (data[i].changedToAt || 'his word') + '\n';
- Mertie commented on March 19th 20 at 09:18

Find more questions by tags VKontakteJavaScript