Transformation functions
map
Commentary
added in 0.1.20
Generates a map of n
key/value pairs. Duplicate keys will collapse and defer to the latest invocations.
Examples
Generating key/value pairs
{
"_gen": "map",
"key": {
"_gen": "uuid"
},
"value": {
"_gen": "boolean"
},
"n": 5
}
[
{
"ae44d54d-cbea-a17d-9291-fd88398c6212": false,
"f00da6e6-b54d-bcf4-7a87-4079b498abf7": false,
"84ee9557-3a51-6d4a-b1ce-aebbdd154317": true,
"3af81778-33a6-f1a8-d1b3-136896e4667f": false,
"9f5f10b1-29dc-e3ea-e0f9-ab9a63cf0e4f": false
},
{
"b68f5d5e-fa14-9320-ccde-49882388187a": true,
"545d9709-6fc2-3ee6-d8a1-1f558f95ae80": false,
"6893f4f8-4bf9-0990-a62e-60f93b969c93": true,
"cb684266-eb6d-d2e7-a639-36e94b45da8f": true,
"77f6c109-2c20-3652-77f2-8b2862faaba9": false
},
{
"a66ac766-26d6-8ac4-ac25-c3c2ef454a62": false,
"7ca3a060-378f-5f5f-1bcf-284cbf7ccf0a": true,
"a8113386-ca2c-393f-3265-80b5448f6772": true,
"25577f65-3073-0008-8756-ac6871618ae9": false,
"351bf4e1-3a6b-4f06-9002-39add6a322f0": true
}
]
Specification
JSON schema
{
"type": "object",
"properties": {
"key": {},
"value": {},
"n": {
"oneOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "object",
"properties": {
"_gen": {
"type": "string"
}
},
"required": [
"_gen"
]
}
]
}
}
}