Data Transformer

Transform the input data according to the output schema

Prompts Chat Republished on Sep 14 0 Bookmarks 0 Copies
Bookmark 0

Prompt template

Format
Json
Inputs
input (json) · Required
Outputs
result (text)
{
  "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"
}

What you'll create

The schema groups records into under eighteen, eighteen through thirty and over thirty. The input contains name, email and numeric age fields.

Frequently asked questions

Does the requested output include a total?

Yes. A total_count property is explicitly part of the schema.

Comments

Tried this prompt? Share what you made, compare results, or ask a question

Up to 4 results. Images up to 2 MB; MP4, WebM, or MOV videos up to 4 MB each