I have a object uriBase:
const nameNFT = `...`;
const descriptionNFT = `...`;
const svg = `...`;
const uriBase = {
Name: `${nameNFT}`,
Description: `${descriptionNFT}`,
Painting: `${svg}`,
};
How can I encode and decode a objedct to Base64? I use ReactJs, I`m tryng something like this:
$ npm install --save js-base64
import { Base64 } from "js-base64";
const uriBase64 = Base64.encode(uriBase);
return uriBase64;
and
const decodeBase64Uri= Base64.decode(uriBase);
return decodeBase64Uri;
and in the console
console.log(decodeBase64Uri);
print:
[Object object]