karh
1
Simple question:
Have an array with objects (from db query):
"query_all_subdomains": [
{
"school_slug": ""
},
{
"school_slug": "schoolname"
},
{
"school_slug": "anotherschoolname"
}
]
I want to check if a value exists in the array, like: schoolname
.
Thought this would be easy with formatters but I think I’m missing something.
I tried the ‘contains’ and ‘where’ formatters.
I want:
When you use where you can set the type to be inarray instead of == etc
karh
3
Thanks, I don’t see inarray - am I looking at the wrong place?
I’ve not played around with them much sure the team can advise i found it when I just had a simple array maybe the logic is different with this
karh
5
Appreciate it anyway!
I feel like this should work what I have in the screenshot above, but it outputs an empty value.
TomD
6
I think you need to get the values, and then use ‘contains’, eg something like:

karh
7
Thanks I managed to fix it right before trying this!
My issue was that Wappler was adding quotes to school_slug
and schoolname
I just started over and used the code field and this prevented it.
2 Likes