String to JSON

the following requirements are required to be implemented quickly:

var str = "a>b and b<c and c=d"

// TODO:  `str`   [{key: "a", symbol: ">", value: "b"}] 
Mar.02,2021

var str = 'a>b and b<c and c=d';
var expressions = str.split('and');
var regExp = /[+-\\*%/><=]/;
var expArray = [];
for(var i=0;i<expressions.length;iPP){
    var expression = expressions[i];
    var keyValue = expression.split(regExp);
    var item = {};
    item.key = keyValue[0];
    item.value = keyValue[1];
    item.symbol = expression.charAt(expression.search(regExp));
    expArray.push(item);
}
console.log(JSON.stringify(expArray));

console.log(str.split('and').map(v => v.trim()).reduce((pre, item) => {
    const reg = /(.*)([>=<])(.*)/g;
    const [t, name, symbol, value] = reg.exec(item);
    return [...pre, {name, symbol, value}];
},[]));
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-1b3b304-2c279.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-1b3b304-2c279.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?