Access query parameter that contain square brackets using handlebars template
See original GitHub issueHi, there is a need to get query parameter that contain square brackets in template eg:
localhost:8080/some_url/?filter[order_id]=123
I need to get value of filter[order_id]
, valid handlebars template for it is:
"{{ request.query.[filter[order_id\]] }}"
checked here http://tryhandlebarsjs.com/
my JSON API request:
{"request": {"urlPath": "/some_url/", "method": "GET"}, "response": {"body": "{{ request.query.[filter[order_id\\]] }}", "status": 200, "transformers": ["response-template"]}}
but get 500 on request accessing this stub:
wiremock.com.github.jknack.handlebars.HandlebarsException: inline@7c8b8743:1:17: found: '[filter[order_id\' {{ request.query.[filter[order_id\]] }}
how can I get this query parameter?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:9
Top Results From Across the Web
Access query parameter that contain square brackets ... - GitHub
Hi, there is a need to get query parameter that contain square brackets in template eg: localhost:8080/some_url/?filter[order_id]=123
Read more >Expressions | Handlebars
Handlebars expressions are some contents enclosed by double curly braces {{}} . In the below template, firstname is a variable that is enclosed ......
Read more >square bracket array access and handlebars template
I'm working on a node project with handlebars tempting engine. I have a very large object I need to represent in a table....
Read more >Query Criteria, Part 3: Prompting for input by using a parameter
Make a query ask for input by using a parameter by using a criteria prompt. You add the prompt in square brackets in...
Read more >Personalizing Templates with Handlebars
To use Handlebars to reference a field that contains spaces or a period, or starts with a number, surround the field in square...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Here’s how you do it:
(EDITED: [ and ] need to be escaped)
My requirement is to read a query parameter with dot “criteria.coverType”