Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
04-18-2022 04:15 PM
I can pass a JSON object to a cypher query using the driver... but It doesn't seem possible to pass an object to the browser using the :params function.
:params obj => { name: "eric", state: "confused" }
Any suggestions?
04-18-2022 05:10 PM
The syntax for :params and :param is different. There is no top-level variable with :params.
Try:
:params { name: "eric", state: "confused" }
Then reference $name and $state in your cypher code in the browser.
If you do want a top-level variable with param and assign it a map, you can use the following syntax.
:param x => ({a: 1, b: 2})
then, you would have $x.a and $x.b
One difference I noticed between :param and :params, is that :params treats numbers as floats, thus setting a value to 1 is interpreted as 1.0.
for more info:
All the sessions of the conference are now available online