#!/bin/bash OBJ=$(cat schema.json|jq -r ".properties.category.enum[]"|gum choose) mdq -c file.title:Title -c website:URL -c file.path:Path -f "{\"category\": { \"\$regex\": \"^$OBJ\"}, \"obj\": \"website\"}" .