cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

How to save data like this in neo4j dumb question

Hello ... how to save data like this in neo4j
CREATE(o:Order)
SET o.value="{"landingPage":"langingPage"}"
return o
it gives me always error

1 ACCEPTED SOLUTION

It looks like you're attempting to set this as a JSON string, note that you're using quotes wrong here. You need to either escape your inner quotes, or use different kinds of quotes to make this work (single quotes on the outside of the string, double-quotes within the string, or vice versa).

You can try this:

CREATE(o:Order)
SET o.value='{"landingPage":"langingPage"}'
return o

View solution in original post

2 REPLIES 2

It looks like you're attempting to set this as a JSON string, note that you're using quotes wrong here. You need to either escape your inner quotes, or use different kinds of quotes to make this work (single quotes on the outside of the string, double-quotes within the string, or vice versa).

You can try this:

CREATE(o:Order)
SET o.value='{"landingPage":"langingPage"}'
return o

Many thx bro!!! Works very good. Thank you.