Postgres Query:
SELECT ((data->>\'date\')) AS time, ((data->>\'totalAmount\')) as values FROM invoices
O