Hello. I have a script that has three fields: title, message, image. They are all of type text. The first two are required and the image one is optional. I’m trying to build a variable that looks like this:
data:
title: "{{ title }}"
message: "{{ message }}"
data:
image: "{{ image }}"
but I only want the data and image to show up if image was provided. Can someone help me with the syntax for this?
For example, if I provide all three, it would show up like
data:
title: "title"
message: "message"
data:
image: "/some_url.png"
but if I only had title and message, it would only show up like:
data:
title: "title"
message: "message"