Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
08-02-2022 05:51 AM
Hie,
I have a python dictionary, temp = {"Height":168, "Weight":112, "id":10}. I am trying to create node label "Person". Can I use the dict as the properties for the node? As "match (n:person{temp}) return n" this is throwing an error, I have connceted neo4j to python using neo4j library.
Is there a possible way to do this?
08-02-2022 06:08 AM
08-02-2022 06:41 AM
Well it's not, because in python dictionary, they keys are enclosed in strings example {"key":"value"}, but neo4j doesn't accept if the propery name is enclosed inside string, it accepts only if it's {key:"value"} like this.
08-02-2022 07:28 AM - edited 08-02-2022 07:28 AM
You should be able to pass the dictionary in the parameters of the connector otherwise you can use apoc.convert.fromJsonMap() function from APOC plugin.
All the sessions of the conference are now available online