mongodb-erlang
mongodb-erlang copied to clipboard
How to append to an array
Example in README
Command = #{<<"$set">> => #{
<<"tags.1">> => "rain gear"
}},
mc_worker_api:update(Connection, Collection, #{'_id' => 100}, Command),
just replaces the element at the 1st position. What I wanted is add the element at the start or end. Using "-1" does not work. Any help would be highly appreciated. Thanks