1

ここに私の文書があります:

{
    $set: {"paths.0.pathBreak" : {

                "1": {
                    "Key1" : [66.92, 22.34],
                    "Key2" : "Val2",
                    "Key3" : [64.92, 22.34],
                    "Key4" : "destination : dest2",
                    "transportTypes" : [{
                        "type" : "bus",
                        "fare" : {
                            "adult" : 5.0,
                            "child" : 2.0,
                            "all" : 5.0
                        },
                        "encodedPath" : "kjfghl2h34h2l4h",
                        "approxTime" : "00:00:30",
                        "info" : "direct "
                    }]  
                }
            }
        }
}

insertDoc次のようにmongodbシェルを介して変数に割り当てると:

> insertDoc={
... $set: {"paths.0.pathBreak" : {
...
... "1": {
... "Key1" : [66.92, 22.34],
... "Key2" : "Val2",
... "Key3" : [64.92, 22.34],
... "Key4" : "destination : dest2",
... "transportTypes" : [{
... "type" : "bus",
...
Display all 173 possibilities? (y or n)
...         codedPath" : "kjfghl2h34h2l4h",
...               "approxTime" : "00:00:30",
...               "info" : "direct "
...             }]
... }
... }
... }
... }

変数に割り当てられないのはなぜですか、どこから行が割り当てられましたか

Display all 173 possibilities? (y or n)

から来た。誰かがそれを理解できますか?
編集: 実際には、mongoVUE から mongo シェルにドキュメントを貼り付けています。

4

1 に答える 1

3

MongoVue から貼り付けると、貼り付け中に mongo シェルが Linux シェルにドロップアウトする原因となる隠し文字が発生します。

最良のオプションは、メモ帳++または同様の別のプログラムで作成し、新しい行も除外することです。

于 2013-06-28T20:22:03.420 に答える