Trying to import simple data (see below), gets me an error "Operation passed in cannot be an array" in Compass 1.29.6
This error makes no sense to me, as the outer object is not an array. Sure, the first object contains an array, but how is this not importable, since it is valid JSON? What is it expecting?
I have checked the documentation for Compass, perused other similar errors, no answers are obvious or relevant enough to help me.
{
"Name": "root",
"ID": 0,
"Children": [{
"Name": "Chocolates",
"ID": 1,
"ParentID": 0
}]
}
db.getCollection(<name>).insert({ "Name": "root", "ID": 0, "Children": [{ "Name": "Chocolates", "ID": 1, "ParentID": 0 }] })
– Tobitobiah