Closed MinhVu2711 closed 2 years ago
I have a variable name 'symbol' which content crypto's symbol (Exp: DIA) But when I use ${symbol} an error 'Property assignment expected' appears. Here is my code:
${symbol}
store.set(`${id_user}`, { `${symbol}`: { price_set: ctx.state.price_set, percent: ctx.state.percent, status: ctx.state.status } } );
What I should do to have data in JSON file storage like below???
{ "844827665": { "DIA": { "price_set": 1.8223378037209135, "percent": "10", "status": "up" } } }
Tks for reading my issue. Have a good day, sir
I have a variable name 'symbol' which content crypto's symbol (Exp: DIA) But when I use
${symbol}
an error 'Property assignment expected' appears. Here is my code:What I should do to have data in JSON file storage like below???
Tks for reading my issue. Have a good day, sir