0

i want to write an AQL FOR arrangodb TO FETCH all the results matching with a particuler input

i tried something like this for all the locations which starts with GR

FOR con IN countries
FILTER "%GR%" LIKE con.location 
RETURN {
"name" : con.name
}

but it retruns empty .and it has the location starting with GR. i'm new to AQL ,any idea what i'm missing

avi
  • 175
  • 2
  • 5
  • 17

1 Answers1

0

fount it , using REGEX_TEST

LET con  = "US"
FOR con IN countries
 LET match = REGEX_TEST(con.location, con ,true)
FILTER match == true                     
RETURN {
"name" : con.name
}
avi
  • 175
  • 2
  • 5
  • 17