startsWith
Check if a string starts with a given substring.
string(required): the string to testprefix(required): the substring to check for
bash
echo '{"orderId": "ORD-001"}' | utlx -e 'startsWith($input.orderId, "ORD-")'
# trueutlx
if (!startsWith($input.id, "ORD-")) error("Invalid order ID format")
{
validFormat: startsWith($input.orderId, "ORD-"),
orderId: $input.orderId
}