Hey guys,
I need some help here…
I have a table containing tags for products “product_tags”
And I have a product table “products” that have a column of tags for each product (JSON field)
What I’m trying to do is to get a unique list of the “used” tag_ids in my products table…
For the above set of data I should get [“2”, “1”, “6”]
My way to go was:
1) add a multiple records query pulling the product Tags “qr_getProd_Tags”,
2) add an ArrayList “tagList_Array” and define its schema as “tag_id”: Number,
3) add a repeat “repeat_prods” looping through the products,
4) add a nested repeat “repeat_tags” looping through each prd_Tags column (JSON field),
5) check if “tagList_Array” contains the current “repeat_tags” $value (tag-id) and
6) if not, add this $value (tag-id) to “tagList_Array”
My problem is that step 5 (ArrayList.contains) always returns false
So, I went with the where formatter and solved it:
BUT the question is:
HOW THE ArrayList.contains() is supposed to be used?