How to convert an array to another format?

how to make the following array, this gatewayB2c is dynamic, such as this:

"gatewayB2c": [{
                        "singlemaxamt": "9999999999999",
                        "biztype": "1201",
                        "singleminamt": "0.01",
                        "bankcode": "000000",
                        "bankname": "",
                        "cdflag": "A"
                    }]

is converted to the following format?

[{name: "singlemaxamt", value: "9999999999999"},
         {name: "biztype", value: "1201"},
         {name: "singleminamt", value: "0.01"},
         {name: "bankcode", value: "000000"},
         {name: "bankname", value: ""},
         {name: "cdflag", value: "A"}]

has taken out the value of gateWayB2c. This is how it is written

.
var ccc=gatewayB2c;
       ccc.forEach(function(v,i){   
               var bbb = Object.keys(v);
            Object.keys(v).forEach(function(v){
                /*console.log(v)//key
                console.log(ccc[i][v])//*/
               
                var name = v;
                var value = ccc[i][v];
                var c=bbb.length;
                //arr.push("name:"+v,"value:"+ccc[i][v]);
               console.log(name+"------"+value);
            })
            console.log(arr);
        })
The

value is like this

singlemaxamt------9999999999999
 biztype------1201
 singleminamt------0.01
 bankcode------000000
bankname------
cdflag------A

I don"t know how to write below

Mar.20,2021

const gatewayB2c = [{
      "singlemaxamt": "9999999999999",
      "biztype": "1201",
      "singleminamt": "0.01",
      "bankcode": "000000",
      "bankname": "",
      "cdflag": "A"
    }];

    let data = [];
    gatewayB2c.forEach(function (item) {
      for (let [key, value] of Object.entries(item)) {
        var obj = {
          name: key,
          value: value
        };
        data.push(obj);
      }
    });

    console.log(data);


let arr = [{
    "singlemaxamt": "9999999999999",
    "biztype": "1201",
    "singleminamt": "0.01",
    "bankcode": "000000",
    "bankname": "",
    "cdflag": "A"
}]

let newArr = [];
arr.forEach(item => {
    for (var key in item) {
        const obj = {
            name: key,
            value: item[key]
        }
        newArr.push(obj);
    }
})

console.log(newArr);
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb0cda-2304.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb0cda-2304.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?