hi Alessandro,

*What if source string contains both single and double quotes.*

var db = orient.getGraph();
var id= 1000;
var desc = "Bollywood Superstar "Akshay Kumar", Ileana D'Cruz"

var vkQuery = 'CREATE VERTEX post CONTENT {"id":'+ id+',"desc":"'+ desc +
'"}'; 
var vkInsert = db.command("sql",vkQuery);


On Friday, 19 August 2016 18:32:49 UTC+5:30, [email protected] wrote:
>
> Hi,
> you could use
>
> var db = orient.getGraph();
> var id= 1000;
> var desc = "Bollywood Superstar Akshay Kumar, Ileana D'Cruz"
> var vkQuery = 'CREATE VERTEX post CONTENT {"id":'+ id+',"desc":"'+ desc +
> '"}'; 
> var vkInsert = db.command("sql",vkQuery);
>
>
> Best 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.

Reply via email to