将变量的值分配给我的对象标识符 json

assign the value the variable to my object identifier json

首先,请原谅我的英语,不是很好。

我正在创建这样的 json 对象:

data = {UUIDDevice:
               {"Latitude": Latitude, 
                "Longitude": Longitude, 
                "Model": ModelDevice, 
                "IDDevice": UUIDDevice, 
                "Platform": PlatformDevice
               }
            };

我的问题是对象标识符:UUIDevice 不取变量的值,只把 UUIDevice 像这样:

{ UUIDDevice: //<--Here should there be a text like: 35e620c299bc087a 
 { Latitude: '6.2720517',
   Longitude: '-75.5478177',
   Model: 'XT1033',
   IDDevice: '35e620c299bc087a',
   Platform: 'Android' 
 }
}

我稍后尝试使用一个变量作为字符串,将其应用于 JSON.parse(),好吧,这很好用,但是 returns 将对象标识符放入引号中,所以当我尝试从我的对象中获取 属性,例如:data.UUIDevice.Model 发生错误:"Cannot read property "Model" "

我希望你能帮我解决这个问题,我认为这可能与对象标识符中的串联有关,但我不知道会怎样。

data = {}
data[UUIDDevice]=
               {"Latitude": Latitude, 
                "Longitude": Longitude, 
                "Model": ModelDevice, 
                "IDDevice": UUIDDevice, 
                "Platform": PlatformDevice
               };