mongo.cr icon indicating copy to clipboard operation
mongo.cr copied to clipboard

Can't convert query result to array

Open ghost opened this issue 8 years ago • 1 comments

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

ghost avatar Jun 11 '17 19:06 ghost

@oltmannsdaniel If you want to convert BSON back to JSON, pretty sure you can just do .to_json no?

elrok123 avatar Jul 24 '17 14:07 elrok123