<!--
{
  "documentType" : "article",
  "framework" : "AppleNewsFormat",
  "identifier" : "/documentation/AppleNews/adding-a-json-table",
  "metadataVersion" : "0.1.0",
  "role" : "article",
  "title" : "Adding a JSON Table"
}
-->

# Adding a JSON Table

Add a table to your article that displays JSON data in rows and columns.

## Discussion

To add a table with JSON-formatted data, add a component with the role property set to `datatable`. Set up your table by providing an array of data descriptors that communicate the following:

- Data types
- Unique keys
- Data formats

In the [`DataTable`](/documentation/AppleNewsFormat/DataTable) component, you use `dataRecords` to add your data in key-value pairs that correlate your data with the data descriptors.

You can apply styles to adjust the appearance of your table using the `tableStyle` property of the [`ComponentStyle`](/documentation/AppleNewsFormat/ComponentStyle) object the table uses. You can specify styles for individual rows, columns, and cells as well as for the entire table. (See [`TableStyle`](/documentation/AppleNewsFormat/TableStyle) for more information.)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)