[{
name:'here is name, which can have punctuation marks ',
value: 'here will be text '
},
{
name:'here is name, which can have punctuation marks ',
value: 'here will be text '
}]
I am trying to find the best way to keep it in neo4j node. Since later I am going to search, filter ... on this data I don't want to keep hole object as string. Creating property by name object.name is not possible because I have punctuation marks. The ideal way would be to keep it as property, because I am going to use this data as property of node, but removing punctuation marks from name is not an option too.
Probably I could keep them in array
['here is the name', ' and the second element of array is the text']
In this case the problem will be to give correct name to the property, which will have this array.
Another option could be to keep all data in list like this
tabs: ['first name - first value', ' second name - second value']
but to search later I will need to use regex inside the list. this doesn't seem flexible.
So what would be the best way ?
Thank you in advance!
Maybe this is not good for your use-case,
but what about use the apoc.create.nodes ,
to create a Node with a label ("MyLabel" in this case), so that you can have every data you need in a specific label (possibly to be indexed and/or connect with other entities)?
CALL apoc.create.nodes(["MyLabel"], [{
`name.with.dots`:'here is name, which can have punctuation marks .',
value: 'here will be text '
},
{
name:'here is name, which can have punctuation marks ',
value: 'here will be text '
}]) yield node
return node
Thank you for your answer. So since now I can create property name with any symbol except backticks, I am curious if there is a way to have backticks in property name or label?
Seems like approach with backticks works only with property name and not value.