Hello Can someone help me to make integer from str...
# help
n
Hello Can someone help me to make integer from string in a response? Like this:
Copy code
"year": "{{now format='yyyy' type='NUMERIC'}}",
"month": "{{now format='M' type='NUMERIC'}}",
"day": "{{now format='d' type='NUMERIC'}}",
"hour": "{{now format='h' type='NUMERIC'}}",
But this doesn’t work. Main idea is that I generate components(year, month, day…) from date with formats and then I want to make it to integer types to decode it, because backend sends this fields in integer type. Or maybe someone can suggest another way to mock response like that?
1
o
As long as you use quotes, it will inject strings as JSON spec expects. Not sure removing them is going to help though, I don't have an opportunity to test it right now. We'll try to do it tonight when I'm at the hotel
n
It works without quotes. Thanks
o
You're welcome!