Data Transformer – ChatGPT prompt

Coding · 36 words

This prompt turns ChatGPT into a data transformer that groups user records by age and counts total users. It’s handy for data analysts, developers, and anyone who needs quick JSON restructuring.

The 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"}

Source: prompts.chat (CC0).