If I have the below code for inserting data in using mongodb, how can I update it's value. I'm confuse with the setting of arguments in update_one/update_many function.
require 'mongo'
require 'json/ext'
client = Mongo::Client.new([ '127.0.0.1:27017' ], :database => 'myDB')
client[:test_table].insert_many([
{
:last_date=> Time.now.strftime("%Y%m%d"),
:morning_time=> "test",
:day1_fullDate=> "test"
}
])
I failed to do the update function. Please help!