Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
04-28-2019 09:58 AM
Why the Cypher doesn't support quotes in property key? For eg.
The following will throw an error:
CREATE (l:Label
{
'name': "Some Int'l name"
}
)
RETURN l
Invalid input ''': expected whitespace, comment, a property key name, '}', an identifier or UnsignedDecimalInteger
But following works:
CREATE (l:Label
{
name: "Some Int'l name"
}
)
RETURN l
I am concerned because I need to query with Cypher from some json request. How can we do that? Converting the quotes from dict
keys only seems to be very much difficult process:
r = { 'name': "Some Int'l name" }
other_example = { 'foo': 'this contains foo', 'bar': 'this contains bar' }
How would you replace { 'name': "Some Int'l name" }
with {name: "Some Int'l name" }
from a docstring? The docstring even may contain double quote: {"name": "Some Int'l name"}
.
Solved! Go to Solution.
04-28-2019 10:45 PM
04-28-2019 02:07 PM
surround it with backticks (on the kwyboard the tilde key) instead of double quotes.
04-28-2019 10:45 PM
Okay, I have managed to use entry manually rather than json object.
All the sessions of the conference are now available online