Map Values (Free Online Tool)

Remap existing values through a lookup table such as enums, codes, or category names

Paste your JSON → Get results instantly (no signup)

⚡ Instant resultsNo signupRuns in your browser
Try examples:

Map values in this data using lookup rules and map status codes.

[
{
"name": "Server A",
"status": "active"
},
{
"name": "Server B",
"status": "inactive"
}
]
Output
1[
2 {
3 "name": "Server A",
4 "status": "enabled"
5 },
6 {
7 "name": "Server B",
8 "status": "disabled"
9 }
10]

Love the result?

Use this exact pipeline in your app, backend, or LLM workflow.

No setup needed. Works with curl, Node, Python.

Uses example data. For edited input, copy from the playground.

Read integration guide

Works with:

  • API responses
  • Nested JSON
  • Arrays & objects

Example: input → output

Input / Output
Input
[
{
"name": "Server A",
"status": "active"
},
{
"name": "Server B",
"status": "inactive"
}
]
Output
[
{
"name": "Server A",
"status": "enabled"
},
{
"name": "Server B",
"status": "disabled"
}
]

Related tools

Advanced usage (optional)

Map Values

v1.0.0
Convert
objectarraydestructive

Description

Map Values

Replace values using a lookup table — map status codes, translate enums, recode categories, and convert between value representations. Define a mapping of old values to new values, and the utility replaces every match.

How It Works

Provide a JSON object as the mapping table where keys are the original values and values are the replacements. The utility scans targeted fields and replaces any matching values.

{
  "active": "enabled",
  "inactive": "disabled"
}

Values not found in the mapping table can be kept as-is, removed, or replaced with a default.

Configuration

FieldTypeDefaultDescription
Target Pathspath-picker[]Select paths whose values should be mapped (empty = all values)
Value Mappingsjson{}JSON object mapping old values to new values
Unmatched Valuesenumkeepkeep: leave unchanged. remove: delete the field. default: use the default value.
Default Valuestring""Replacement for unmatched values (only used when Unmatched Values is default)

Use Cases

Status Code Translation

  • Server status: Map active/inactive to enabled/disabled
  • HTTP codes: Map 200"OK", 404"Not Found"
  • Priority levels: Map 1/2/3 to "High"/"Medium"/"Low"

Data Standardization

  • Boolean strings: Convert "true"/"false"/"yes"/"no" to actual true/false
  • Country codes: Map "US""United States", "UK""United Kingdom"
  • Category recoding: Consolidate similar categories under standard names

Data Migration

  • Schema mapping: Translate enum values between old and new schemas
  • Localization: Map English labels to translated strings
  • Default handling: Replace unknown or legacy values with a standard default

Configuration

NameTypeDefaultDescription
Target Pathspath-picker[]Select paths whose values should be mapped (empty = all values)
Value Mappingsjson{}JSON object mapping old values to new values. Example: {"active": "enabled", "inactive": "disabled"}
Unmatched Valuesenumkeepkeep: leave unchanged. remove: delete the field. default: use the default value. keep remove default
Default ValuestringReplacement for unmatched values (only used when Unmatched Values is "default")

Examples

AI Prompt
Map values in this data using lookup rules and map status codes.
[
{
"name": "Server A",
"status": "active"
},
{
"name": "Server B",
"status": "inactive"
}
]
Output
1[
2 {
3 "name": "Server A",
4 "status": "enabled"
5 },
6 {
7 "name": "Server B",
8 "status": "disabled"
9 }
10]
Config
Target Paths
status
Value Mappings
1{
2 "active": "enabled",
3 "inactive": "disabled"
4}
Unmatched Values
keep
Default Value

API Usage

POST /api/v1/utilities/convert.map-values
Example:
curl -X POST https://your-domain.com/api/v1/utilities/convert.map-values \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"primary":[{"name":"Server A","status":"active"},{"name":"Server B","status":"inactive"}]},"config":{"targetPaths":["status"],"mappings":{"active":"enabled","inactive":"disabled"},"unmatchedAction":"keep","defaultValue":""}}'
Response
1[
2 {
3 "name": "Server A",
4 "status": "enabled"
5 },
6 {
7 "name": "Server B",
8 "status": "disabled"
9 }
10]