Hey

I'm trying to build a filter from a map using my filter parameters as 
key:value, But I keep getting error > 
```
ArangoError: AQL: syntax error, unexpected [ near '[object Object]c.name == 
"d2382b...' at position 1:1 (while parsing)
```
Here is my function >
```
public async getCollectionsQuery(query: Record<any, any>): Promise<Record<
any, any>[]> {
const req = query["request"]
const keys = Object.keys(req)
if (keys.length) {
let rules: string = "";
for (const [key, value] of Object.entries(req)) {
rules += "c." + key + " == " + value + " AND "
}
rules = rules.substring(0, rules.length - 5)
let q = aql`
FOR c IN ${this.mCollectionPtr}
FILTER` + rules + `
RETURN c
`
console.log(q)
const cursor = await this.mDB.getDatabase().query(q)
return await cursor.all();
}
return []
}
```
Can any1 please help me up understand where I hit the wall with it? I'm 
lost. 

-- 
You received this message because you are subscribed to the Google Groups 
"ArangoDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/arangodb/249f548e-2170-41e0-bec4-be461c448067n%40googlegroups.com.

Reply via email to