Update multiple property of each node at once

The below code updates once property at a time.


Is there any way to update multiple properties at once

e.g. i have the below node Data

I want to update description and name at once by passing an updated object how can we do that?
currently i have to write m.set() individually.

diagram.model.commit(m => {
  m.set(nodeData, "name", "newName");
  m.set(nodeData, "description", "newValue2");

So this is the only way to do it?

It’s efficient. What else do you want?