mongo.cr
mongo.cr copied to clipboard
Can't convert query result to array
So I inserted following data into the database:
{
"name": "Group #1",
"users": [
"daniel",
"bob"
]
}
But if I want to get that array back, the Result is an BSON::Code and I can't do anything with it. How could that be fixed and is there any workaround? @datanoise
@oltmannsdaniel If you want to convert BSON back to JSON, pretty sure you can just do .to_json no?