2

CypherReSTAPIを使用しています。2つの名前と値のペア「columns」と「data」を持つ1つのオブジェクトを返します。列を捨てて、ノードを配列の配列ではなくオブジェクトとして返す方法はありますか?これに沿った詳細:http://bl.ocks.org/4062045#miserables.json

これが私が今得ているものです:

curl -d @query --header "Content-Type:application/json" http://localhost:7474/db/data/cypher
{
  "columns" : [ "source", "r_type", "target" ],
  "data" : [ [ "Corn", "LIKES", "Parsley" ], [ "Corn", "LIKES", "Sunflowers" ], 
[ "Corn", "LIKES", "Pumpkin" ], [ "Corn", "LIKES", "Peas" ], [ "Corn", "LIKES", "Beans" ], 
[ "Corn", "HATES", "Tomato" ], [ null, null, null ], [ "Carrots", "LIKES", "Tomato" ], 
[ "Carrots", "LIKES", "Peas" ], [ "Carrots", "LIKES", "Onions" ], ....

クエリファイル:

{
  "query" : "start n  = node(*) match n -[r?]-> m return n.name? as source, type(r) as r_type, m.name? as target",
  "params" : {
  }
}
4

1 に答える 1

3

これを実現するためにサーバー プラグインを作成できます。その後、REST API を介して利用できるようになります。

于 2013-01-28T18:23:45.290 に答える