How do I get update working for multi values inside array for object?

Hi
I am running UPDATE set for 1 leveled array . It only updates the value for last value in set statement

UPDATE USE KEYS ‘keyid’
SET i.attr1 = value1 , i.attr2 = value2
for i in details when details.attr1 = “value0” END

It only changes attr2 to value2 . If I have attr3 with value3 , it will only update attr3. Is it expected behavior ?

Thank you for your support.

UPDATE mybucket b USE KEYS "keyid"
SET v.attr1 = value1  FOR v IN b.details WHEN  v.attr1 = "value0" END,
          v.attr2 = value2  FOR v IN b.details WHEN  v.attr1 = "value0" END;

OR

UPDATE mybucket b USE KEYS "keyid"
SET  b.details[pos] = OBJECT_PUT(OBJECT_PUT(v,"attr1","value1"),"attr2","value2")  FOR pos:v IN b.details WHEN  v.attr1 = "value0" END;