JSON Data Source

Learn how to structure your JSON data files for merging with PowerPoint templates.

Basic Structure

Your JSON file should be an array of objects. Each object represents one slide in the final presentation.

Example

[
  {
    "name": "John Doe",
    "title": "Software Engineer",
    "email": "john@example.com",
    "department": "Engineering"
  },
  {
    "name": "Jane Smith",
    "title": "Product Manager",
    "email": "jane@example.com",
    "department": "Product"
  }
]

This will create two slides, one for each object in the array.

Nested Objects

You can use nested objects in your JSON data and traverse them using dot notation:

[
  {
    "employee": {
      "name": "John Doe",
      "contact": {
        "email": "john@example.com",
        "phone": "555-1234"
      }
    },
    "company": "Acme Corp"
  }
]

In your PowerPoint template, reference nested fields using dot notation:

  • {{employee.name}} - Direct property access
  • {{employee.contact.email}} - Deep nested property access
  • {{company}} - Top-level property

Global Addressing

When addressing from outside the current object context, use the json. prefix:

  • {{json.marketing.kpis.nrOfVisits}} - Accesses deeply nested properties
  • {{json.profile.details.title}} - Full path traversal

Arrays

If your data contains arrays, you can reference array elements by index using square bracket notation:

[
  {
    "name": "John Doe",
    "skills": ["JavaScript", "Python", "SQL"],
    "projects": [
      {"name": "Project A", "status": "Complete"},
      {"name": "Project B", "status": "In Progress"}
    ]
  }
]

Reference array elements:

  • {{skills[0]}} - First skill (JavaScript) - use square brackets
  • {{projects[0].name}} - Name of first project (Project A)
  • {{json.object[2].innerObject.property}} - Deep nested array access

Array Indexing

Array indices start at 0:

  • {{array[0]}} - First element
  • {{array[1]}} - Second element
  • {{json.data[2].property}} - Third element's property

Data Types

JSON supports various data types:

  • Strings: "text value"
  • Numbers: 123 or 45.67
  • Booleans: true or false
  • Null: null (will be replaced with empty string)
  • Arrays: [1, 2, 3]
  • Objects: {"key": "value"}

File Requirements

  • File extension: .json
  • Encoding: UTF-8
  • Maximum file size: Check service limits
  • Format: Valid JSON (use a JSON validator if unsure)

Common Patterns

Employee Directory

[
  {
    "name": "John Doe",
    "title": "Senior Engineer",
    "photo": "https://example.com/photos/john.jpg",
    "bio": "John has 10 years of experience..."
  }
]

Product Catalog

[
  {
    "product_name": "Widget A",
    "price": "$29.99",
    "description": "High-quality widget",
    "image_url": "https://example.com/products/widget-a.jpg"
  }
]

Nested Business Data

For complex business reports with nested structures:

{
  "marketing": {
    "kpis": {
      "nrOfVisits": 15000,
      "conversionRate": 3.2
    },
    "tables": {
      "topByVisit": [
        {"url": "/page1", "visits": 5000},
        {"url": "/page2", "visits": 3000}
      ]
    }
  }
}

Address with: {{json.marketing.kpis.nrOfVisits}} or {{json.marketing.tables.topByVisit}}

See: JSON in PowerPoint - no-code way with PPTXMailMerge for advanced examples.

Tips

  1. Validate Your JSON: Use a JSON validator to ensure your file is properly formatted before uploading.

  2. Consistent Structure: Keep the structure consistent across all objects in your array for predictable results.

  3. Escape Special Characters: If your data contains quotes or special characters, ensure they are properly escaped.

  4. Large Files: For very large datasets, consider splitting into multiple files or batches.

  5. Object vs Array:

    • Use a single object when creating one unified report
    • Use an array of objects when you need to repeat slides for each item
  6. Global Addressing: Use json. prefix when addressing from outside the current object context, especially for nested structures.

Next Steps