【发布时间】:2019-09-15 18:32:28
【问题描述】:
我有一个来自 http 请求的 JSON 字符串,我需要将其存储在 MySql 表、列和行中
我需要在 Node.js 中完成。通过 http 请求获取 JSON 字符串是没有问题的。 http://lonobox.com/api/index.php?id=100004854
问题是将其转换为列和行并存储在MySql中。替代postgre
这是我的 JSON 字符串
[
{
"200004854": {
"temperature": "14.2",
"humidity":"68"
}
},
{
"200005584": {
"temperature": "20",
"humidity":"51"
}
},
{
"100004854": {
"barometer":"1002"
}
}
]
【问题讨论】: