var mogla = { "bedType": undefined, "camaSupletoria" : "false", "comments" : "", "guest[0].name":"Su He", "guest[1].name":null, "roomBackCode":"LABDBL", ".smoker2":null } var myobj = JSON.parse(JSON.stringify(mogla));