from my api I get the following array:
const apiResponse = [
{
"accountBillNumber": "123456789",
"amountMoney": "0.00"
},
{
"accountBillNumber": "987654321",
"amountMoney": "0.01"
},
];
I would like to write a very short code that will always change the value from accountBillNumber to value.replace(/(^\d{2}|\d{4})+?/g, '$1 '). Can it be done in a modern way with one line using es6 +?
accoutnBillNumberor its value?