Java dsl query for updating array


please help me translate below update query to java sdk dsl update query.

Update merchant use keys [“1234567890”]
set emails = ARRAY_PUT(emails, {‘attribute’ : ‘data2’})
FOR contact in merchant.contactInfo when contact.roleId == “123” END
FOR emails in contact.emailInfo END

Hi All,

For now i am executing update query as below, instead of using dsl.

String updateEmailAuditQuery=“Update merchant use keys [$seNumber] SET contact.emailInfo = ARRAY_PUT(contact.emailInfo, $expiringEmail) FOR contact in merchant.contactInfo WHEN contact.roleId == $roleId END”;
N1qlQueryResult result=merchantBucket.query(N1qlQuery.parameterized(updateEmailAuditQuery,JsonObject.create().put(“seNumber”,seNumber).put(“expiringEmail”,emailDoc.content()).put(“roleId”,roleId)));