question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Get all predicates of a resource

See original GitHub issue

I need to get all predicates of a resource.

For instance, with the resource in the example (https://ruben.verborgh.org/profile/#me), I try:

console.log(Object.keys(await person));

I expect:

['name', 'givenName', 'familyName', 'interest', 'friends', /*...*/ ]

but I get:

[ 'settings', 'subject', 'proxy', 'extendPath' ]

What is the good way to get all predicates of a resource with LDFlex?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
rubensworkscommented, Jun 27, 2019

Perhaps it would make sense to let .predicates return the expanded IRIs, and .properties return the compacted terms?

FYI, the JSON-LD context parser can compact terms like this: https://github.com/rubensworks/jsonld-context-parser.js#compact-an-iri

0reactions
jblemeecommented, Jun 28, 2019

Like it too, i’ll start working on it very soon

Read more comments on GitHub >

github_iconTop Results From Across the Web

SPARQL all predicate-object pairs of subject and all its ...
The question is: what SPARQL query can deliver all the predicate-object pairs necessary to instantiate a particular resource of "Class C".
Read more >
Predicate - Minecraft Wiki - Fandom
Predicates are JSON structures found in multiple different locations within data packs. They are invoked with various means to check conditions within the ......
Read more >
How to use Predicates correctly in cypher allShortestPaths
Run two separate queries, combine the results. You can get all shortest paths. You can get all :Resources with their closest parent with...
Read more >
SPARQL Examples – Select - Cody Burleson
Find all classes with a given prefix​​ The SPARQL keyword a is a shortcut for the common predicate rdf:type , giving the class...
Read more >
Query Predicates | HTTP API - commercetools documentation
Predicates provide a way to define complex expressions for querying resources or specifying conditional triggers for API Extensions. The queryable APIs support ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found