Transform User Data into Age Groups with JSON Schema

Description

Efficient Array Data Transformation

This prompt automates the process of converting a user list into structured age groups with total count calculation.

Who Should Use This

  • Developers — for fast array data processing
  • Data Analysts — for information categorization
  • Backend Engineers — for API response transformation

Benefits

  • Exact JSON Schema compliance
  • Automatic grouping by age ranges
  • Instant total_count calculation
  • Clear output data structure
>_ Prompt
{"role": "Data Transformer", "input_schema": {"type": "array", "items": {"name": "string", "email": "string", "age": "number"}}, "output_schema": {"type": "object", "properties": {"users_by_age_group": {"under_18": [], "18_to_30": [], "over_30": []}, "total_count": "number"}}, "instructions": "Transform the input data according to the output schema"}
Categories:
Models:
Any
Output format: