Aliases
Aliases make long paths easier to read and distinguish fields from different files.
@customer and $customer are equivalent inside JQL. Prefer @customer in terminal commands because many shells interpret $customer before JQL receives the query.
Source aliases
Use as after a source:
select {orderId: o.id, total: o.total}
from 'orders.json' as o
Source aliases are especially useful in joins:
from 'orders.json' as o
inner join 'customers.json' as c on o.customerId = c.id
Path aliases
Use alias for a nested path:
select {name: @customer.name}
from 'order.json'
alias details.customer as customer
Sequential aliases
Aliases are introduced from left to right. A later alias can build on an earlier one:
select {email: @contact.value}
from 'response.json'
alias users[0] as user, @user.contacts[0] as contact
Use source paths when a nested array should become many rows. Use aliases when a particular nested object is referenced several times.