Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function parseData(response, value : string = '1') : string {
- // Data not acquired
- if (!response) {
- return;
- }
- return Object.keys(response.data).map(x => {
- return Object.keys(response.data[x]).map(i => {
- const finalValue : number = parseFloat(value) * parseFloat(response.data[x][i]);
- return `*${value} ${x}* to *${i}*: \`${finalValue.toFixed(2)}\``;
- }).join('\n');
- }).join('\n\n');
- }
Add Comment
Please, Sign In to add comment