Hi Anton,
try this function with the parameter message {"id": "123", "text": "aaa",
"user": [{"id": "200", "name": "bbb"},{ "id": "201", "name": "ccc"}]}
var obj = JSON.parse(message);
var user=obj.user;
var g=orient.getGraph();
for(i=0;i<user.length;i++){
var content="'id' : '"+ user[i].id+"' , 'name' : '"+ user[i].name+"'";
var query="INSERT INTO user CONTENT { " + content + " } ";
g.command('sql',query);
}
The users with id=200 and id=201 will be created.
Regards,
Alessandro
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.