How to put variable in JSON body of core.http?

This workflow works:
version: 1.0
tasks:

[555, 191]

task1:
action: core.http
input:
url: <% st2kv(‘system.t20-url’) %>/equipment/actions/<% ctx(‘action’) %>
body: “{“id”:“60ac004413e4a00082c96bbd”}”
method: POST
headers:
Content-Type: application/json

input:

  • equipmentId
  • action

But I do not want to hard code the id in the body, I want to use the ctx(“equipmentId”) variable. How can I use that variable, but still send the body as JSON? It seems like http.core requires the body to be a string.

Here is what I have tried:
“{“id”:<% ctx(“equipmentId”) %>}”
<% ‘{“id”:"’ ctx(“equipmentId”) ‘"}"’ %>
‘{“id:”’<% ctx(“equipmentId”)%>’"}’

They all fail with some parsing error.

I figured it out:

body: <% concat(’{“id”:"’, ctx(“equipmentId”), ‘"}’) %>

lol