| layout | api-command | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| language | JavaScript | ||||||||||
| permalink | api/javascript/set_union/ | ||||||||||
| command | setUnion | ||||||||||
| io |
|
||||||||||
| related_commands |
|
{% apibody %} array.setUnion(array) → array {% endapibody %}
Add a several values to an array and return it as a set (an array with distinct values).
Example: Retrieve Iron Man's equipment list with the addition of some new boots and an arc reactor.
r.table('marvel').get('IronMan')('equipment').setUnion(['newBoots', 'arc_reactor']).run(conn, callback)