I get this error message, when I try to parse the result set, returned by MATCH
query. What I want is to somehow convert the resultset to a dictionary. I should say that I know how to access particular fields of the result set - like row['a']['name']
, but what I do not like is that I can not convert the whole row['a']
to a dictionary or to get something like row['a'].keys()
.
So, this is what I tried:
res = graph.cypher.execute("MATCH (a:Object {id: 1}) return a")
for r in res:
print r['a']['id'] # this works
for r in res:
print r['a'].keys() # this does not
#what I want is something like
{x:y for (x,y) in zip(r['a'].keys(), r['a'].values()}