Dynamic nodes and building relationships dynamically by Importing data from json files

1. Edit DataStore file to make this change:
Change "DataStore":"Datastore-652" to "DataStore":"DataStore-652"

2. Use this script for UserV. Just create these nodes without any relationships.

CALL apoc.load.json("file:///VMDetails.json") YIELD value AS vm
MERGE(v:UserV{vmName:vm.vmName})
SET v.CPU= vm.CPU,
v.ConnectionState = vm.ConnectionState,
v.DataStore = vm.DataStore[0],
v.Hostname = vm.Hostname,
v.InstanceUuid = vm.InstanceUuid,
v.IpAddress = vm.IpAddress,
v.Network = vm.Network[0],
v.NumEthernetCards = vm.NumEthernetCards,
v.NumVirtualDisks = vm.NumVirtualDisks,
v.OverallStatus = vm.OverallStatus,
v.PowerState = vm.PowerState,
v.RAM = vm.RAM,
v.Uuid = vm.Uuid

Network and DataStore values are presented as arrays in VMDetails.json file

3. Create the relationships:
match (a:UserV)
match (b:Network) where b.Network = a.Network
merge (b)-[:connected]->(a)
return a, b

match (a:UserV)
match (b:DataStore) where b.DataStore = a.DataStore
merge (b)-[:related]->(a)
return a, b

Result: