mercredi 24 août 2022

How to format a response to have columns and rows in array?

I have an API response and return the following format.

AccountId Requests
1         3
2         67
3         50
          10
-- 10 batches, 10 datasources

However, when I added this response to an empty array, it changed to the below format.How can I change the format in the array to columns and rows?

["\e[1mAccountId    requests    \n\e[m1    3    \n2    67    \n3    50    \n    9.   \n-- 10 batches, 10 datasource\n"]   

Aucun commentaire:

Enregistrer un commentaire