mcollina/levelgraph-jsonld — pull request #9 by elf-pavlik (2013-12-08 23:46:27+00:00)
Title: search example from README doesn't work

When I try to run it I get empty array in solutions... we need to make sure that we put in README only exact examples from test suite!
While not that familiar with LevelGraph joins I also don't find it obvious what exactly we search for here, adding one sentence about intended results will make it clearer for everyone.

```javascript
var nested = {
"@context": {
"name": "http://xmlns.com/foaf/0.1/name"
, "knows": "http://xmlns.com/foaf/0.1/knows"
}
, "@id": "http://matteocollina.com"
, "name": "matteo"
, "knows": [{
"name": "daniele"
}, {
"name": "lucio"
}]
};

db.jsonld.put(nested, function(err) {
db.join([{
subject: db.v("person")
, predicate: "http://xmlns.com/foaf/0.1/knows"
, object: db.v("friend")
}, {
subject: db.v("friend")
, predicate: "http://xmlns.com/foaf/0.1/knows"
, object: "daniele"
}], function(err, solutions) {
// The solutions will be:
// 1. { person: "http://matteocollina.com", friend: "_:abcde" }
// 1. { person: "http://matteocollina.com", friend: "_:efghi" }
});
});
```