Answer the question
In order to leave comments, you need to log in
Fetching data from Arango, how to find matches in an array?
I have a collection with the following structure:
{
"user": 1,
"timestamp": 216354113151,
"message": "asddsaasddsaa",
"data": [
"name=Jack&hash=s5w464t35w145df13s5df4sdg&id=2",
"name=Mansonack&hash=xga5fd7h68745v46ed2&id=18",
]
}
Answer the question
In order to leave comments, you need to log in
It is better to store all this in a separate field and hang a full-text index on it
. But there is a solution, below
LET rs = (FOR item IN rcity
RETURN {
result: item.data[* FILTER CONTAINS(CURRENT, "hash=s5w464t35w145df13s5df4sdg") RETURN r ]
})
RETURN rs[0].result[0]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question