Define SQL Result Data

Hi

I have a query to get some data.like:

  • SQL
select friend as edges from (MATCH {class:v, as:person, where:(kngraphId = 'GR0000000000855' and type = 'instance')}.bothE(){as:friend, where:($matched.person != $currentMatch),optional:true}  RETURN distinct  friend) limit -1
  • Question

The Result has ten properties. but now,I just need five of them. I need this five act as an object,not single property.

  • what should I do ?

52HZ

Thanks

Hi @52HZ

You can use nested projections:

MATCH
...
RETURN friend:{prop1, prop2, propX}

Thanks

Luigi

Hi @luigidellaquila

I got it , Thanks for your answer.

52HZ