2015-10-31 3 views
0
"Title": "Anti-Mage", 
    "Url": "antimage", 
    "ID": 1, 
    "Lore": "The monks of Turstarkuri watched the rugged valleys below their mountain monastery as wave after wave of invaders swept through the lower kingdoms. Ascetic and pragmatic, in their remote monastic eyrie they remained aloof from mundane strife, wrapped in meditation that knew no gods or elements of magic. Then came the Legion of the Dead God, crusaders with a sinister mandate to replace all local worship with their Unliving Lord's poisonous nihilosophy. From a landscape that had known nothing but blood and battle for a thousand years, they tore the souls and bones of countless fallen legions and pitched them against Turstarkuri. The monastery stood scarcely a fortnight against the assault, and the few monks who bothered to surface from their meditations believed the invaders were but demonic visions sent to distract them from meditation. They died where they sat on their silken cushions. Only one youth survived - a pilgrim who had come as an acolyte, seeking wisdom, but had yet to be admitted to the monastery. He watched in horror as the monks to whom he had served tea and nettles were first slaughtered, then raised to join the ranks of the Dead God's priesthood. With nothing but a few of Turstarkuri's prized dogmatic scrolls, he crept away to the comparative safety of other lands, swearing to obliterate not only the Dead God's magic users - but to put an end to magic altogether. ", 
    "SuggestedRoleLevels": { 
     "Carry": 2, 
     "Escape": 3 
    }, 
    "Enabled": true, 
    "Side": "Radiant", 
    "Aliases": [ 
     "am" 
    ], 
    "AttackCapabilities": "DOTA_UNIT_CAP_MELEE_ATTACK", 
    "PrimaryAttribute": "DOTA_ATTRIBUTE_AGILITY", 
    "Initial": { 
     "Strength": 22, 
     "StrengthGain": 1.2, 
     "Agility": 22, 
     "AgilityGain": 2.8, 
     "Intelligence": 15, 
     "IntelligenceGain": 1.8, 
     "Health": 568, 
     "HealthRegen": 0.91, 
     "Mana": 195, 
     "ManaRegen": 0.61, 
     "Armor": 2.08, 
     "MagicResistance": 0.25, 
     "MinDamage": 49, 
     "MaxDamage": 53, 
     "AvgDamage": 51, 
     "IncreasedAttackSpeed": 22, 
     "BaseAttackTime": 1.45, 
     "AttackTime": 1.19, 
     "AttacksPerSecond": 0.84, 
     "AttackAnimationPoint": 0.3, 
     "AttackAcquisitionRange": 600, 
     "AttackRange": 128, 
     "VisionDayRange": 1800, 
     "VisionNightRange": 800, 
     "ProjectileSpeed": 0, 
     "MovementSpeed": 315, 
     "TurnRate": 0.5 
    }, 
    "Abilities": [ 
     { 
     "Title": "Mana Break", 
     "Url": "mana_break", 
     "HeroAbilityUrl": "antimage_mana_break", 
     "ID": 5003, 
     "Description": "Burns an opponent's mana on each attack. Mana Break deals 60% of the mana burned as damage to the target. Mana Break is a Unique Attack Modifier, and does not stack with other Unique Attack Modifiers.", 
     "Lore": "A modified technique of the Turstarkuri monks' peaceful ways is to turn magical energies on their owner.", 
     "Notes": [ 
      "Mana Burn is blocked by spell immunity.", 
      "You can lifeleech the damage dealt by this skill with a Lifesteal aura." 
     ], 
     "Type": "DOTA_ABILITY_TYPE_BASIC", 
     "Behavior": [ 
      "DOTA_ABILITY_BEHAVIOR_PASSIVE" 
     ], 
     "DamageType": "DAMAGE_TYPE_PHYSICAL", 
     "AbilitySpecial": [ 
      { 
      "Name": "Damage Per_burn", 
      "Url": "damage_per_burn", 
      "Value": [ 
       0.6 
      ] 
      }, 
      { 
      "Name": "Mana Burned Per Hit", 
      "Url": "mana_per_hit", 
      "ValueType": "FIXED", 
      "Value": [ 
       28, 
       40, 
       52, 
       64 
      ] 
      } 
     ] 

Это фрагмент из моего json-файла, я хочу вставить его внутри mongodb под названием dota2.Вставьте mongodb в свой json-файл

Я пытался команду:

mongoimport --jsonArray -d dota2 -c docs --file heroes.json 

возвращение сказал мне:

2015-10-31T12:09:35.755-0200 connected to: localhost 
2015-10-31T12:09:35.842-0200 imported 110 documents 

Но я не буду получать информацию о моих данных, команда: db.dota.find() Возвращение пустой ...

Кто-то может мне помочь? Да ... Я новичок в mongodb. :/

ответ

1

В соответствии с вашей командой вы вставляете данные в коллекцию с именем docs, присутствующую в базе данных dota2.

Таким образом, вы, вероятно, следует сделать как

use dota2; 
db.docs.find(); 
+0

Shivanand, чтобы использовать его в другом контексте приложения, например, в угловых маршрутах для доступа, я всегда должен получить доступ к коллекции? –

+0

Да, всегда должен быть доступ к коллекции. Используйте имя базы данных при получении объекта соединения в MongoDB. –

+0

Хорошо, спасибо большое. –

0

Хорошо, я понимаю, мои данные в MongoDB! Но внутри коллекций документов :) Это работает!

Смежные вопросы