I get Cannot iterate over null (null) from the below query because .property_history is not present in result object.
Cannot iterate over null (null)
.property_history
result
How do i che
jq '.result.property_history // empty | map(select(.event_name == "Sold"))[0:1][].date'`
Trick is to use // together with empty.
Another alternative is to use an additional select:
jq '.result.property_history | select(.) | map(select(.event_name == "Sold"))[0:1][].date'`