$addToSet: {
users: {
name: request.body.data.user.name,
_id: "321321321321321321"
}
}
users: [{
name: {
type: String,
required: true,
unique: true,
},
_id: false
}]
var USD = await getJSON
async function getJSON(url) {
const response = await fetch(url)
return await response.json()
}
(async () => {
const dataJSON = await getJSON('https://www.cbr-xml-daily.ru/daily_json.js')
console.log(dataJSON.Valute.USD.Value)
})()
Я просто начинающий)
.script префикс для скриптов (.sc - сокращенно)