If a user wants to search a json
payload using a starts_with
or “begins with” or “has prefix” query, jq
natively supports it.
How to query using startswith
Given a json
array, searching for a specific string that startswith
a prefix is easy.
|
|
Find each person if their name begins with sal
.
|
|
Output
|
|