Get URL param into REST body

@dejan :

How can I access a URL parameter ${query->get(‘letter’)} inside REST - Body - DATA, .like this:

{
  "query": [
    { 
      "filterActive": "==Not Active", 
      "filterType": "Music",
      "Head Artist": "==${query->get('letter')}*"
    }
  ],
  "sort": [
    {"fieldName": "Head Artist", "sortOrder": "ascend"}
  ],
  "offset": 1,
  "limit": 100
}

I have verified that the ${query->get(‘letter’) is working correctly when set on a p-tag in builder:



This outputs the correct value, taken from URL param, on live site.
Skärmavbild 2024-08-25 kl. 23.17.59

Any suggestions appreciated

@dejan @Pakic Any ideas on this?

1 Like

Thanx @Pakic :pray:t3:
I was stuck in using the $query variable…

Awesome support as usual

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.