1 Object

Ax.util.js.object lets you create a JavaScript object with the enumerable properties of one or more source objects. Let's see its usage with the following example:

Copy
let row = Ax.db.executeQuery("SELECT tabname , tabid ,  3 as b FROM systables").firstOne()
const obj  = Ax.util.js.object.assign( { a: 1, b: 2 }, row);
{ "tabid": 1, "a": 1, "tabname": "systables", "b": 3 }

As we can see the resulting objects have the properties of all the source objects.

If two objects have the same property, for example b, the resulting object will have the property b with the value of the last object.

Copy
const source = { b: 4, c: 5 };
const obj2 = Ax.util.js.object.assign( { a: 1, b: 2 }, source);
{ "a": 1, "b": 4, "c": 5 }