Remap by Lookup (Free Online Tool)

Replace old field values in rows using matching values from lookup rows

Paste your JSON → Get results instantly (no signup)

⚡ Instant resultsNo signupRuns in your browser
Try examples:

Use Lookup Rows to replace old user IDs in related order rows.

[
{
"id": "o1",
"user_id": "u_old_1",
"total": 50
},
{
"id": "o2",
"user_id": "u_old_2",
"total": 75
}
]
Output
1[
2 {
3 "id": "o1",
4 "user_id": 9281,
5 "total": 50
6 },
7 {
8 "id": "o2",
9 "user_id": 9282,
10 "total": 75
11 }
12]

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

Related tools

Advanced usage (optional)

Remap by Lookup

v1.0.0
Merge
array

Description

Remap by Lookup

Use this when Lookup Rows contain the new generated IDs, and Rows to Update still contain old IDs.

For example, after importing users into a database, the database may create new id values. Related order rows may still contain old user_id values from the CSV export. This utility replaces each old user_id with the matching new ID from Lookup Rows.

Inputs

  • Rows to Update: the rows that should be changed.
  • Lookup Rows: rows that contain both the old value and the new generated value.

Fields

  • Source Field: field in Rows to Update that contains the old value.
  • Lookup Match Field: field in Lookup Rows that contains the old value.
  • Lookup Value Field: field in Lookup Rows that contains the new value.
  • Output Field: field to write. Leave blank to replace Source Field.
  • Missing Match: choose error, keep, or null.

Configuration

NameTypeDefaultDescription
Source Fieldstringuser_idField in Rows to Update that still contains the old ID
Lookup Match Fieldstringold_idField in Lookup Rows that contains the old ID
Lookup Value FieldstringidField in Lookup Rows that contains the new generated ID
Output FieldstringField to write. Leave blank to replace Source Field.
Missing MatchenumerrorWhat to do when a row has no lookup match error keep null

Examples

AI Prompt
Use Lookup Rows to replace old user IDs in related order rows.
[
{
"id": "o1",
"user_id": "u_old_1",
"total": 50
},
{
"id": "o2",
"user_id": "u_old_2",
"total": 75
}
]
Output
1[
2 {
3 "id": "o1",
4 "user_id": 9281,
5 "total": 50
6 },
7 {
8 "id": "o2",
9 "user_id": 9282,
10 "total": 75
11 }
12]
Config
Source Field
user_id
Lookup Match Field
old_id
Lookup Value Field
id
Output Field
Missing Match
error

API Usage

POST /api/v1/utilities/merge.remap-by-lookup
curl -X POST https://your-domain.com/api/v1/utilities/merge.remap-by-lookup \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"primary":[{"id":"o1","user_id":"u_old_1","total":50},{"id":"o2","user_id":"u_old_2","total":75}],"secondary":[{"old_id":"u_old_1","id":9281,"name":"John"},{"old_id":"u_old_2","id":9282,"name":"Jane"}]},"config":{"sourceField":"user_id","lookupMatchField":"old_id","lookupValueField":"id","outputField":"","missing":"error"}}'
Response
1[
2 {
3 "id": "o1",
4 "user_id": 9281,
5 "total": 50
6 },
7 {
8 "id": "o2",
9 "user_id": 9282,
10 "total": 75
11 }
12]