I want to convert the below object in an array. object is as like below,
var obj = {
"abfdgc" :"def",
"dfdgsf" : "ret",
"trytr" : "dhgf"
}
into below format :
var obj = [{
"abfdgc" :"def",
"dfdgsf" : "ret",
"trytr" : "dhgf"
}]
在这里,你可以这么简单:
obj = [obj];
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.