I have a JSON data in a URL, I want to get all JSON data from the URL by JavaScript (without jQuery) and put it into variable tags
.
JSON Data:
[
{
"uniq":"AXk2_U9l"
},
{
"uniq":"AX0apLOG"
},
{
"uniq":"AXrGmWk4"
},
{
"uniq":"AXID1Psx"
},
{
"uniq":"vovs2aPlj"
}
]
And my JavaScript code, this code does not work:
async function get() {
let url = 'https://jsonware.com/json/abfe005c41c8214e22e487b8d6eff417.json'
let obj = await (await fetch(url)).json();
console.log(obj);
}
var tags = get();
if there is a new method, please show.