I have a script in node.js
that takes json
of a site that comes in this format:
{"nome123":123.4,"nome213":231.4."nome123":123.4}
I want to quote the numbers and leave it like this:
{"nome123":"123.4","nome213":"231.4","nome123":"123.4"}
How do I do this?
const saPrices = 'https://api.csgofast.com/sih/all'
Trade.prototype.getSteamapis = function getSteamapis(callback) {
request(saPrices, (error, response, body) => {
if (!error && response.statusCode === 200) {
const items = JSON.parse(body)
return callback(null, items)
}
const statusCode = (response) ? response.statusCode || false : false
return callback({ error, statusCode })
})
}