1

Using the terminal, I need to set a field in the document with a text, like an article for example, but it seems to be too long, this text certainly is lower than 16MB.

db.test.insertOne({ _id: 10, text: "/article content/", qty: 5 })

Only set it as a normal field, returns a Syntax Error.

SyntaxError: missing ; before statement @(shell):1:9

What would be the best way to insert this document, with this field, in the collection?

user2977500
  • 147
  • 10
  • Most likely if you can load the content into a variable and use that you'll be golden. Check out this answer (inserting from a file): https://stackoverflow.com/a/39620301/3788456. – AJ X. Jun 21 '18 at 22:56

0 Answers0