1
You can use the function Object.()
const original = {0: 0.08075, 1024.0: 51200.0}
const map = new Map(Object.entries(original));
console.log(map);
1
1
You can use the function Object.()
const original = {0: 0.08075, 1024.0: 51200.0}
const map = new Map(Object.entries(original));
console.log(map);
Opá, Valeu pedro, that’s right, but still returned me only array more that way I can already work the data. Thanks
Browser other questions tagged javascript array arraylist objects
You are not signed in. Login or sign up in order to post.
if php uses json_decode($var, true);
– Willian
Put the code that’s best.
– LeAndrade
Blza Leandro? So dude doing a map var array = test.map(el => Object.Keys(el). map(key => el[key])); console.log(array);
– FernandoAntunes
Willian is Javascript, I need to access after the following way: array[0]. 1024.0 to get the value 0.0748
– FernandoAntunes