How to access neo4j apoc uuid as a string?

Hello @mail2michaelenn :slight_smile:

Please don't post topics on both platform.

I'm pretty sure the \ come from the JSON.stringify() function.

You should follow the documentation to retrieve correctly the data, you don't need to convert it as JSON. More documentation here.

Regards,
Cobra

I am afraid your response is not helpful ...pointing me to entire docs is really a pitiful response...I will take your point about posting on both platform...I was unaware they are linked.

Well, know that the people who help here do their best and take time to help you get on the right track. Also, I'm not going to mess around with copying and pasting the examples from the documentation, that's why I just put a link.

On the second link I sent you, there are some examples to properly consume the data from the driver.

apoc.create.uuid() doesn't add a tab (\t) at the start as far as I'm aware. I have just tried locally and on Aura and I get a string without any padding.

return apoc.create.uuid() // "b158188d-5f0a-4726-9f63-b27a7ef6cb72"

Did you generate these UUIDs elsewhere? Have you somehow imported the IDs into the database? What version of Neo4j and APOC are you using?

You can update the values in Neo4j with a Cypher query, for example:

MATCH (r:Race)
WHERE r.race_id STARTS WITH "\t"
SET r.race_id = trim(r.race_id)

Hi Adam....I am not sure where the tab was generated....but that seems to be the problem. The UUIDs were generated in the Neo4j Browser (desktop) version 4.4.5 with apoc.create.uuid(). Thanks for the suggested fix.