ok, I need away to do the following
I have the mongo collect as
array (
'_id' => new MongoId("50513d8338fc5de706000000"),
'offers' =>
array (
'0' =>
array (
'minspend' => '50.00',
'cashback' => '1.50',
'percentage' => '0.03',
),
'1' =>
array (
'minspend' => '100.00',
'cashback' => '3.00',
'percentage' => '0.03',
),
),
'percentageTotal' => '0.06',
'test' => new MongoInt32(1),
)
but lets say I want to update only this part
array (
'0' =>
array (
'minspend' => '50.00',
'cashback' => '1.50',
'percentage' => '0.03',
),
what is the best way to change that part of the sub array without re-creating the whole collection of data in that array.
and is it possible to do something like this
array (
'0' =>
array (
'Offer_id'=> new MongoId(5715671561715),
'minspend' => '50.00',
'cashback' => '1.50',
'percentage' => '0.03',
),
)