Key-value pairs are converted to json format

for example, the key-value pair is as follows: {2) the key-value pair is [2], 3, 3, and 4, respectively.
how can it be transformed into this [{"m, v, v, m, m, b, b]

how to transform it into this way [{"m, v, v, m, v, m,
Mar.03,2021

var obj = {2: 'aa', 3: 'bb', 4: 'cc'}; 
var rs = [];
for (let i in obj) {
    var o = {
        m: i,
        n: obj[i]
    }
    rs.push(o);
}
console.log(rs);


<br>

let arr=[],json = {2:'aa',3:'bb',4:'cc'}
Object.keys(json).forEach(item=>{arr.push({m:item,n:json[item]})})
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-1beac97-31a44.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-1beac97-31a44.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?