How to Remove Square bracket from JSON

Use this when you return:

return properties[0];

Or

var data = [

{
    "Name": "TEST",
    "deviceId": "",
    "CartId": "",
    "timestamp": 1383197265540,
    "FOOD": [],
    "City": "LONDON CA"
 }

]; // Or whatever the Json is
data = data[0];

Or if you're accessing the json via another object

var data = jsonObj[0];

var tmpStr = '[    
    {
        "Name": "TEST",
        "deviceId": "",
        "CartId": "",
        "timestamp": 1383197265540,
        "FOOD": [],
        "City": "LONDON CA"
     }

]';

var newStr = tmpStr.substring(1, tmpStr.length-1);

See this codepen example