jsoncpp - Neo4j and json creating multiple nodes with multiple params -


i tried many things of no use. have raised question on stackoverflow earlier still facing same issue. here link old stackoverflow question creating multiple nodes properties in json in neo4j

let me try out explaining small example query want execute

{    "params" : {       "props" : [          {             "localasnumber" : 0,             "nodedescription" : "10timos-b-4.0.r2 ",             "nodeid" : "10.227.28.95",             "nodename" : "blr_wao_sarf7"          }       ]    },    "query" : "match (n:router) n.nodeid = {props}.nodeid  return n"} 

for simplicity have added 1 props array otherwise there around 5000 props. want execute query above fails. tried using (props.nodeid}, {props[nodeid]} fails. possbile access individual property in neo4j?

my prog in c++ , using jsoncpp , curl fire queries.

if {props}.nodeid in query props parameter must map, pass in array. do

"props" : {         "localasnumber" : 0,         "nodedescription" : "10timos-b-4.0.r2 ",         "nodeid" : "10.227.28.95",         "nodename" : "blr_wao_sarf7"  } 

you can use array of maps parameter either simple create statement.

create ({props}) 

or if loop through array access individual maps

foreach (prop in {props} |      merge (i:interface {nodeid:prop.nodeid})       on create set = prop ) 

Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -