Quantcast
Channel: Mockaroo Community Forum - Latest posts
Viewing all articles
Browse latest Browse all 2665

How to use a custom distribution type to add data to an array

$
0
0

I'm trying to figure out how to use the custom distribution type from a custom list to create an array of values.

I can assign the expected values to a single field as shown in this example:
https://mockaroo.com/7156f820

Note how the single tag selected always corresponds to the category as specified in the custom distribution rules.

But when I change the tags field to an array of 1-3 items, the range of tags is selected from any of the tags, not just the subset specified in the custom distribution rules:
https://mockaroo.com/c8557e50

Is Mockaroo not setup to handle a random assignment of a subset of custom list values to an array, or is there another way to achieve the same objective?

The goal is to see this:

[{
"category": "Cafe/Bar",
"tags": [
"cb4",
"cb1"
]
}, {
"category": "Restaurant",
"tags": [
"r3",
"r5",
"r1"
]
}, {
"category": "Agriculture",
"tags": [
"a4",
"a2"
]
}]

Not this:

[{
"category": "Cafe/Bar",
"tags": [
"cb4",
"a5"
]
}, {
"category": "Restaurant",
"tags": [
"a5",
"m4"
]
}, {
"category": "Agriculture",
"tags": [
"ps4",
"m1"
]
}]


Viewing all articles
Browse latest Browse all 2665

Trending Articles