Remap by Composite Lookup (Free Online Tool)
Replace old field values in rows by matching multiple fields 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 when IDs are only unique within each co...
Output✓
Output✓
1[2 {3 "id": "o1",4 "country": "US",5 "user_id": 9281,6 "total": 507 },8 {9 "id": "o2",10 "country": "CA",11 "user_id": 8172,12 "total": 7513 }14]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.
Works with:
- API responses
- Nested JSON
- Arrays & objects
Example: input → output
Inputs / OutputOutput
Related tools
Advanced usage (optional)
Remap by Composite Lookup
v1.0.0Merge
array
Description
Remap by Composite Lookup
Use this when Lookup Rows contain the new generated IDs, and Rows to Update still contain old IDs, but one field is not enough to find the right lookup row.
For example, user_id might only be unique inside a country. Match Rows to Update by country and user_id, then read the new generated ID from Lookup Rows and write it back to user_id.
Inputs
- Rows to Update: the rows that should be changed.
- Lookup Rows: rows that contain the old fields and the new generated value.
Fields
- Source Fields: fields in Rows to Update, in matching order.
- Lookup Match Fields: fields in Lookup Rows, in matching order.
- Lookup Value Field: field in Lookup Rows that contains the new value.
- Output Field: field to write in Rows to Update.
- Missing Match: choose
error,keep, ornull.
Configuration
| Name | Type | Default | Description |
|---|---|---|---|
| Source Fields | json | ["country","user_id"] | Flat fields in Rows to Update that together identify the lookup row |
| Lookup Match Fields | json | ["country","old_id"] | Flat fields in Lookup Rows that match Source Fields in the same order |
| Lookup Value Field | string | id | Field in Lookup Rows that contains the new generated ID |
| Output Field | string | user_id | Field to write in Rows to Update |
| Missing Match | enum | error | What to do when a row has no lookup match error keep null |
Examples
AI Prompt
Use Lookup Rows to replace old user IDs when IDs are only unique within each country.Output✓
Output✓
1[2 {3 "id": "o1",4 "country": "US",5 "user_id": 9281,6 "total": 507 },8 {9 "id": "o2",10 "country": "CA",11 "user_id": 8172,12 "total": 7513 }14]Config
Source Fields
1[2 "country",3 "user_id"4]Lookup Match Fields
1[2 "country",3 "old_id"4]Lookup Value Field
id
Output Field
user_id
Missing Match
error
API Usage
POST /api/v1/utilities/merge.remap-by-composite-lookup
curl -X POST https://your-domain.com/api/v1/utilities/merge.remap-by-composite-lookup \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"inputs":{"primary":[{"id":"o1","country":"US","user_id":"u_old_1","total":50},{"id":"o2","country":"CA","user_id":"u_old_1","total":75}],"secondary":[{"country":"US","old_id":"u_old_1","id":9281},{"country":"CA","old_id":"u_old_1","id":8172}]},"config":{"sourceFields":["country","user_id"],"lookupMatchFields":["country","old_id"],"lookupValueField":"id","outputField":"user_id","missing":"error"}}'Response
1[2 {3 "id": "o1",4 "country": "US",5 "user_id": 9281,6 "total": 507 },8 {9 "id": "o2",10 "country": "CA",11 "user_id": 8172,12 "total": 7513 }14]