Extract an array
Paste JSON and enter a path such as data.books. The selected items appear in Extracted Array. For a root-level array, use $.
Learn how to extract arrays from JSON and convert each item into formatted text. Follow the examples below, then try them in RabbitJson.
Paste JSON and enter a path such as data.books. The selected items appear in Extracted Array. For a root-level array, use $.
Write a template such as ${name}. Review the Transformation Result, then choose Copy. To try sample data, choose Load example in the workspace.
The array and text update automatically as you edit.
Choose Extract array, then enter a template and choose Transform text. You can extract without a template.
Editing the template keeps the extracted array. Editing JSON or the path requires another extraction in Manual mode. Old results are cleared to prevent copying outdated text.
Large input uses plain text without line numbers. All data is still processed. Outputs preview up to 200 lines or 12,000 characters and may end mid-item. Copy or Download includes the complete result.
Drafts stay in the current tab. If saving fails, keep the page open or save your input elsewhere before refreshing. Switching languages keeps your draft when browser storage is available.
Use dots for fields and brackets for indexes: data.books or items[0].tags. Keys containing dots or spaces need quoted brackets, such as data["book.list"]. Use $ for a root array. The final value must be an array.
Suggestions only include paths that return arrays. Use Up and Down to choose, Tab or Enter to insert, and Escape to dismiss.
Select an array at the top level.
JSON Input
{
"books": [
{
"name": "Book A",
"price": 10
},
{
"name": "Book B",
"price": 20
}
]
}Path Expression
booksExtracted Array
[
{
"name": "Book A",
"price": 10
},
{
"name": "Book B",
"price": 20
}
]Use a dot to move into an object.
JSON Input
{
"data": {
"books": [
{
"name": "Book A",
"price": 10
},
{
"name": "Book B",
"price": 20
}
]
}
}Path Expression
data.booksExtracted Array
[
{
"name": "Book A",
"price": 10
},
{
"name": "Book B",
"price": 20
}
]Indexes start at zero.
JSON Input
{
"items": [
{
"id": 1,
"tags": [
"a",
"b"
]
},
{
"id": 2,
"tags": [
"c",
"d"
]
}
]
}Path Expression
items[0].tagsExtracted Array
[
"a",
"b"
]Wrap a field or expression in ${…}. Type inside the braces for field suggestions.
Everything outside ${…} stays as plain text. Each item produces a result joined with a new line. Suggestions support nested fields and show availability across items.
Inside a template expression, use Up and Down to choose a field, Tab or Enter to insert, and Escape to dismiss.
${$item} is the current element; ${$index} starts at 0. Use ${$index + 1} to number from 1. Fields support ${name} and ${$item.name}. Reserved keys use ${$item["$item"]} or ${$item["$index"]}. Use ${JSON.stringify($item)} to output an entire object as JSON.
For this root-level array, set Path Expression to $. Apply the template to produce one Markdown bullet per item, then copy the result.
Extracted Array
[
{
"name": "Alice"
},
{
"name": "Bob"
}
]Template String
- ${name}Transformation Result
- Alice
- BobUse $item for the current string and $index + 1 for numbering.
Extracted Array
[
"admin",
"editor"
]Template String
${$index + 1}. Role: ${$item}Transformation Result
1. Role: admin
2. Role: editorUse the current number directly in calculations.
Extracted Array
[
10,
20,
30
]Template String
${$item} × 2 = ${$item * 2}Transformation Result
10 × 2 = 20
20 × 2 = 40
30 × 2 = 60Access object fields through $item or use the existing field shorthand.
Extracted Array
[
{
"name": "Alice"
},
{
"name": "Bob"
}
]Template String
${$index + 1}. ${$item.name} / ${name}Transformation Result
1. Alice / Alice
2. Bob / BobInsert a field from each array item.
Extracted Array
[
{
"name": "Book A",
"author": "Author 1"
},
{
"name": "Book B",
"author": "Author 2"
}
]Template String
Book: ${name} by ${author}Transformation Result
Book: Book A by Author 1
Book: Book B by Author 2Calculate a value inside an expression.
Extracted Array
[
{
"name": "Product A",
"price": 100
},
{
"name": "Product B",
"price": 200
}
]Template String
${name}: $${price} (with tax: $${(price * 1.1).toFixed(2)})Transformation Result
Product A: $100 (with tax: $110.00)
Product B: $200 (with tax: $220.00)Combine fields, calculations and plain text.
Extracted Array
[
{
"item": "Item A",
"price": 100,
"qty": 2
},
{
"item": "Item B",
"price": 50,
"qty": 3
}
]Template String
${item}: ${qty} x $${price} = $${price * qty}Transformation Result
Item A: 2 x $100 = $200
Item B: 3 x $50 = $150Blue marks built-in variables and matching fields, purple marks delimiters, orange marks operators, and teal marks numbers. A red wavy underline marks missing fields. Use toFixed(2) for two decimal places.