var str="{"id":[1],"latitude":[12.45787],"longitude":[11.77878]}";
var obj = JSON.parse(str);
for (var key in obj) {
obj[key] = obj[key][0];
}
console.log(obj);
0
solved how to remove square bracket in json formate string?
var str="{"id":[1],"latitude":[12.45787],"longitude":[11.77878]}";
var obj = JSON.parse(str);
for (var key in obj) {
obj[key] = obj[key][0];
}
console.log(obj);
0
solved how to remove square bracket in json formate string?