Hey community,
I have run into an issue that gives me a mild headache. I am quite sure I am missing something basic but I cannot identify it.
Background: I have read up an API response that looks like this:
{
"id": 27653,
"name": "System",
"color": "G200",
"editable": true
},
{
"id": 27654,
"name": "Completeness",
"color": "#36B37E",
"editable": true
},
{
"id": 27655,
"name": "Application",
"color": "R400",
"editable": true
},What I need to do from here is to check if a block including a certain id exists. I have tried this:
{{webResponse.body.id.match("(27653)").size}}which I expected should have returned 1, but it returns 0.
I have played around with the regex and found that is I match on another element in the block it works fine, like this:
{{webResponse.body.name.match("(Compl.*)").size}}returns 1 as expected. So I am thinking that it has to do with the format of the two values, number and string.
Any ideas how to make this .match() function with the numeric attribute id?
Thnx in advance!
Cheers,
// Svante