Skip to content

Array operations

Schema-less Array Operations API

Array operations
await g.sys.db.gen.arrayOperationsGen({
    instance: 'INSTANCE_NAME',
    database: 'DATABASE_NAME',
    collection: 'COLLECTION_NAME',
    find: {
        "id": 1
    },
    operations: [
        {
            operation: "push",
            path: "attributes.color",
            dataToPush: [
                "YELLOW",
                "SKY_BLUE"
            ]
        }
    ]
});
Array operations headers support
1
2
3
4
5
6
await g.sys.db.gen.arrayOperationsGen({
    // ...
    headers: {
        "x-am-authorization": "TOKEN"
    }
});