AI Sidebar
Last updated on 26 Jun 2025
The AI sidebar is a feature of the JSONata Studio Playground that brings Anthropic's Claude 3.5 Haiku AI model to help you create, debug and optimise JSONata expressions. It can assist with tasks like:
- Writing expressions to transform JSON data
- Debugging syntax errors or unexpected results
- Optimizing complex expressions for better performance
- Explaining how specific JSONata functions work
- Converting between different data transformation approaches
Currently, this is an experimental feature with limited usage. All registered users will receive a set number of tokens to use per month which may not renew indefinitely. The future of this feature depends on how beneficial it is to users and the feaback we receive.
Example usage
1. Open the AI sidebar by pressing the button labelled "Ask AI".
2. Enter a question in the input field, like so:
Where is the issue in my JSONata expression?
For tips on how to write an effective prompt, see Anthropic's usage limit best practices.
3. If your question relates to your JSON or JSONata input, you can include those as context by selecting the relevant checkboxes. In this example, we must include the JSONata expression:
$.a.b..c
4. Submit your question and wait for the AI to respond:
The issue in the JSONata expression
$.a.b..c
is the double dot (..
) betweenb
andc
.In JSONata, a single dot (
.
) is used to navigate through object properties, but two consecutive dots (..
) is not valid syntax for property navigation.The correct version would be:
$.a.b.c