我已将JSON保存在数据库中,并希望从每个条目中获取特定对象。 我会告诉你:
[
{
"Messungen":[
{
"car":"no Car choosed",
"g":0.2,
"time":"[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]",
"max":66,
"secondText":"0 - 200 km\/h",
"speed":"[63, 61, 63, 62, 63, 64, 65, 65, 66, 66, 66, 64, 63, 63]",
"tosecond":"\/",
"to100":"\/",
"way":209,
"avg":63
}
]
},
{
"Messungen":[
{
"car":"no Car choosed",
"g":0.2,
"time":"[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44]",
"max":70,
"secondText":"0 - 200 km\/h",
"speed":"[59, 61, 61, 61, 62, 60, 61, 62, 61, 62, 63, 63, 64, 64, 63, 63, 64, 65, 65, 65, 65, 65, 66, 66, 67, 69, 69, 67, 67, 67, 67, 67, 68, 68, 69, 70, 70, 69, 69, 69, 69, 69, 68, 66, 66]",
"tosecond":"\/",
"to100":"\/",
"way":808,
"avg":65
}
]
}
]
我想从阵列Messungen获取方式和汽车作为列表或数组。 这是可能的,还是应该用这两种类型在数据库中创建两个新条目?
谢谢:)
答案 0 :(得分:1)
数据库旨在善于管理许多行。使用数据库的力量。创建一个名为" Messung"并使每个观察(car,g,way,u.s.w)成为表格中的一列。