Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
Instead of nesting this in another loop, you could simply calculate the value of "code" from the value of index(). It's the remainder of the division by 25: [ '{{repeat(100)}}', { "id"...
Answer
#1: Initial revision
Instead of nesting this in another loop, you could simply calculate the value of `"code"` from the value of `index()`. It's the remainder of the division by 25: ```json [ '{{repeat(100)}}', { "id": "{{index()}}", "name": "{{random('long', 'string', 'with', 'name', 'values')}}", "code": "code-{{index() % 25}}" } ] ```