Fields containing special characters like dots, dashes, or starting with $ can be accessed using quotes:
Copy
Ask AI
$.data."alert.sample.data" # Access field containing dots$.data."field-with-dashes" # Access field containing dashes$.data."$field" # Access field starting with $$.data."field:with:colons" # Access field containing colons$.data."field@symbol" # Access field containing @ symbol$.data."field with spaces" # Access field containing spaces$.data."field#hash" # Access field containing hash symbol
$.data.users[*] # Select all users$.data.users[0] # Select the first user$.data.users[-1] # Select last user$.data.users[*].name # Select all user names$.data.users[0].name # Select the name of the first user$.data.users[?(@.id==1)] # Select user with id=1$.data.users[*].roles[0] # Select the first role of each user$.data.settings.* # Select all properties of settings
$.data.users[?(@.age > 30)] # Users over 30$.data.users[?(@.active == true)] # Active users$.data.users[?(@.name == "John")] # User named John$.data.users[?(@.score >= 90)] # Users with score 90 or higher
$.data.users[?(@.age != 30)] # Users not age 30$.data.users[?(@.score >= 85)] # Users with score 85 or higher$.data.users[?(@.score < 80)] # Users with score under 80$.data.users[?(@.active !== false)] # Users that are not inactive