Skip to content

Commit 1c041a5

Browse files
committed
update readme
1 parent a6bcf17 commit 1c041a5

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,18 @@ var identify = new amplitude.Identify()
118118
amplitude.identify(identify);
119119
```
120120

121+
### Arrays in User Properties ###
122+
123+
The SDK supports arrays in user properties. Any of the user property operations above (with the exception of `add`) can accept a Javascript array. You can directly `set` arrays, or use `append` to generate an array.
124+
125+
```javascript
126+
var identify = new amplitude.Identify()
127+
.set('colors', ['rose', 'gold'])
128+
.append('ab-tests', 'campaign_a')
129+
.append('existing_list', [4, 5]);
130+
amplitude.identify(identify);
131+
```
132+
121133
### Setting Multiple Properties with `setUserProperties` ###
122134

123135
You may use `setUserProperties` shorthand to set multiple user properties at once. This method is simply a wrapper around `Identify.set` and `identify`.

0 commit comments

Comments
 (0)