LDFlex: Filter by type


#1

I’d like to issue an LDFlex query, listing all subjects within a document, of a certain type.

You can get all subjects within the document by data["https://example.com/mydocument.ttl"].subjects. It’s possible in SPARQL to specify something like WHERE {?s a mytype}; how can I do that in LDFLex? Is it possible?


#2

Check out the readme here. There is an example of getting node types under usage.


#3

Which example are you referring to? If you mean person.friends.firstName, then I’m pretty sure something like that would only work when referring to a specific node (person) rather than an entire document?


#4

I was referring to this bit here.
console.log('\nTYPES'); for await (const type of person.type) console.log( - ${type});