SergejJurecko/erlmongo

Save to an Mongo array

Closed this issue · 2 comments

Hi,
I can't find how to format my datas in Erlang and choose the encoding style to be able to save as an Array in a Mongo document.

Example of a Mongo Document containing an array :
{
"_id" : MyId,
datas : [0,1,2,3]
}

This type of document is correct in Mongo format.
But how to create such a document with the erlmongo API ?

{array,[1,2,3]}

It works !
Thank you :-)