I have neo4j database with 20 nodes, but there is only 2 label,x and y, now if I export data like below
MATCH (n) RETURN n
after the result of the above command, just used the option Export JSON and saved the JSON file
everynode comes as single element in the list between square brackets in JSON file, but I want it all 20 nodes as separate in the same JSON file. when I load it and print the results, it prints in the single line as
code
with open('./data/hello.json') as df:
df1= json.load(df)
print(df1)
Actual Output
[{'n': {'identity': 50, 'labels': ['x'], 'properties': {'name': 'a', 'place': 'b', 'id': 001}}}, {'n': {'identity': 51, 'labels': ['x'], 'properties': {'name': 'c', 'place': 'd', 'id': 002}}},....]
Expected Output
{'n': {'identity': 50, 'labels': ['x'], 'properties': {'name': 'a', 'place': 'b', 'id': 001}}},
{'n': {'identity': 51, 'labels': ['x'], 'properties': {'name': 'c', 'place': 'd', 'id': 002}}},
.
.
.
so on