Get Keys of Map

Is there a way to get the Keys of a map?

i.e. maybe

MATCH (n1: a) RETURN n1.keys()
or
MATCH (n1: a) RETURN [key for key in n1]

A hacky way for me to do this is to store the keys as an attribute on the map (i.e. {a: 1, b:2, keys: [‘a’, ‘b’]}) but I would like to see if there is an already supported way to do this

RedisGraph offers the keys function for this purpose:
MATCH (n1: a) RETURN keys(n1)

1 Like