Transform JSON Array Items API
Apply a transformation to each item in a JSON array using a field mapping spec: pick fields, rename fields, add computed fields (string templates, math expressions on other fields), and drop fields. Available as a simple REST API — POST your input, get structured JSON back. 1 credit per call, no rate limiting, works in any language with HTTP support.
Try it live →How it works
POST a JSON object with your input data to /v1/exec-map-json. The API processes your request server-side using real computation (not mocked data) and returns a structured JSON response with your results and metadata including credits used and processing time.
Use cases
- Use Transform JSON Array Items in automated pipelines without installing a library
- Call Transform JSON Array Items from AI agent workflows via MCP or REST
- Integrate Transform JSON Array Items into serverless functions with zero dependencies
- Build Transform JSON Array Items functionality into any language that supports HTTP
API Reference
POST https://slopshop.gg/v1/exec-map-json
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Input parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input |
string | object | required | The input data to process |
Example response
{
"data": {
"result": 42,
"console": [],
"execution_ms": 3
},
"meta": {
"credits_used": 1,
"engine": "real",
"ms": 4
}
}
Examples
Three real-world scenarios showing how developers use Transform JSON Array Items in production.
curl -X POST https://slopshop.gg/v1/exec-map-json \
-H "Authorization: Bearer $SLOPSHOP_KEY" \
-H "Content-Type: application/json" \
-d '{"code": "return 2 + 2;"}'
curl -X POST https://slopshop.gg/v1/exec-map-json \
-H "Authorization: Bearer $SLOPSHOP_KEY" \
-H "Content-Type: application/json" \
-d '{"code": "const data = [1, 2, 3, 4, 5]; return data.map(x => x * x);"}'
curl -X POST https://slopshop.gg/v1/exec-map-json \
-H "Authorization: Bearer $SLOPSHOP_KEY" \
-H "Content-Type: application/json" \
-d '{"code": "const s = 'hello world'; return s.split(' ').map(w => w[0].toUpperCase() + w.slice(1)).join(' ');"}'
Code examples
curl
curl -X POST https://slopshop.gg/v1/exec-map-json \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input": "your data here"}'
Python
import requests
response = requests.post(
"https://slopshop.gg/v1/exec-map-json",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"input": "your data here"}
)
result = response.json()
print(result["data"])
Node.js
const response = await fetch("https://slopshop.gg/v1/exec-map-json", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({ input: "your data here" })
});
const { data } = await response.json();
console.log(data);
CLI
# Install the Slopshop CLI
npm install -g slopshop
# Set your API key
export SLOPSHOP_KEY=your_api_key
# Call exec-map-json
slop exec-map-json '{"input": "your data here"}'
Pricing
Credits are purchased in bundles starting at $1 for 1,000 credits. All compute APIs like this one use 1 credit per call — that's $0.001. See all pricing tiers.
Related APIs in Execute
View the full API catalog · Try in playground · Documentation