If you do this within a function you may find Allessando's great answer to 
my query "Access JSON parameters inside Javascript fuction" will guide you 
to make it work easily

On Friday, 17 July 2015 19:37:37 UTC+1, Anton K wrote:
>
> greetings 
>
> i got nested json in shema-less mode
> message: {
>     id: 123,
>     text: "aaa",
>     user: {
>          id: 123,
>          name: "bbb"
>     }
> } 
> (twitter model)
>
> and i want to extract users to separate vertexes. 
>
> i tried different combinations of
> INSERT INTO user CONTENT SELECT user FROM message (with toJson(), 
> asString() etc), with no luck. 
> (com.orientechnologies.orient.core.exception.OSerializationException: Error 
> on unmarshalling JSON content 'select': content must be between {
>  } [ONetworkProtocolHttpDb])
>
> is it possible with single query without explicit listing of fields ( 
> insert into user values (select user.id, user.name))?
>
> version 2.0.9, from web studio.
>

-- 

--- 
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