我读过: MongoDB dot (.) in key name
我目前的处境:
我已经导入了790,000个.json文档。导入之前我没有意识到密钥的名称限制,导入文档时没有错误或警告。
我想完成的事情:
避免删除数据库,进行预处理,然后再次导入。
是否可以在导入后转换键名中的点?
附加的堆栈溢出帖子已有两年历史了,我希望自从提出附加问题以来,已经找到了解决方法。
其中一个文档的摘要:
{
"name" : "ccxt",
"time" : {
.
.
.
"1.10.49" : "2018-01-03T15:29:52.793Z",
.
.
},
"versions" : {
.
.
.
"1.10.49" : {
"dependencies" : {
"qs" : "6.5.1",
"crypto-js" : "3.1.9-1",
"node-fetch" : "2.0.0-alpha.9"
},
"maintainers" : [
{
"email" : "igor.kroitor@gmail.com",
"name" : "x84"
},
{
"email" : "rocket.mind@gmail.com",
"name" : "xpl"
}
],
"main" : "./ccxt.js",
"_npmVersion" : "5.5.1",
"_nodeVersion" : "9.1.0",
"engines" : {
"node" : ">=7.6.0"
},
"license" : "MIT",
"name" : "ccxt",
"devDependencies" : {
"ansicolor" : "^1.1.71",
"browserify" : "^14.5.0",
"mocha" : "^3.5.3",
"istanbul" : "^0.4.5",
"nyc" : "^11.0.3",
"as-table" : "^1.0.31",
"chai" : "^4.1.2",
"coveralls" : "^2.13.1",
"asciichart" : "^1.5.1",
"ololog" : "^1.1.69"
},
"version" : "1.10.49",
"unpkg" : "build/ccxt.browser.js",
"homepage" : "https://ccxt.trade",
"directories" : {
},
"bugs" : {
"url" : "https://github.com/ccxt-dev/ccxt/issues"
},
"author" : {
"email" : "igor.kroitor@gmail.com",
"name" : "Igor Kroitor",
"url" : "https://github.com/kroitor"
},
"_id" : "ccxt@1.10.49",
"runkitExampleFilename" : "example.js",
"_npmUser" : {
"email" : "igor.kroitor@gmail.com",
"name" : "x84"
},
"gitHead" : "74b2dacd41d0866e290be2c928e81e0caaa19e2a",
"_npmOperationalInternal" : {
"tmp" : "tmp/ccxt-1.10.49.tgz_1510233048662_0.2868944362271577",
"host" : "s3://npm-registry-packages"
}
},
.
.
.,
}
}