Filter JSON node easily with JSON Path
It's easy to filter the nodes of the JSON with some simple syntax of JSON Path. Below are the notes of some practical scenarios of filtering:
Filter by date time and contains
To be able to filter the expenses by two fields. One is the expenseDate
need to be a date after a certain point in time. The other is itemName which contains a given keyword taxi
. Example:
$.[?(@.expenseDate >= '2023-03-01T00:00:00' & /taxi/i.test(@.itemName))]